Jump to content

[SOLVED]How do i add Javascript into the header


Recommended Posts

Hi,

 

I want to insert a pice of script into the header of my shop which will allow me to make my category block a accordion java block.

 

The script that i am using is:

 

<script type="text/javascript">
$(document).ready(function()
{
//slides the element with class "menu_body" when paragraph with class "menu_head" is clicked
$("#firstpane p.menu_head").click(function()
{
 $(this).css({backgroundImage:"url(less.gif)"}).next("div.menu_body").slideToggle(300).siblings("div.menu_body").slideUp("slow");
	$(this).siblings().css({backgroundImage:"url(more.gif)"});
});
//slides the element with class "menu_body" when mouse is over the paragraph
$("#secondpane p.menu_head").mouseover(function()
{
  $(this).css({backgroundImage:"url(na.png)"}).next("div.menu_body").slideDown(500).siblings("div.menu_body").slideUp("slow");
	 $(this).siblings().css({backgroundImage:"url(left.png)"});
});
});
</script>

 

I was reading about the {literal} tag but dont know what it really does.

 

Thanks

Edited by eolproductions (see edit history)
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...