[Pro] Css Menu load

Hi Richard, I’m implementing the accordion menu as discussed above into a new site I’ve just started on and again it works great, however as this site may be a long scrolling page with links to anchors up and down the page, is there something that I can add the the script that will cause the menu to close once the link has been clicked, so that when you scroll back to the top the menu is not still open?

Should there be some CSS involved too?

Here’s the script:

$(document).ready(function() {

$('.accordionButton').click(function() {

	$('.accordionButton').removeClass('on');
	  
 	$('.accordionContent').slideUp('normal');

	if($(this).next().is(':hidden') == true) {
		
		$(this).addClass('on');
		  
		$(this).next().slideDown('normal');
	 } 
	  
 });

$('.accordionContent').hide();
});

Here’s the link to the test site:

http://www.stundesign.co.uk/miniscoff/index.html

Hope you can advise when you have some time.

Thanks
Dave


freewaytalk mailing list
email@hidden
Update your subscriptions at: