Posted on

Collapsible sidebar menus, correction

Reference: http://mysitemyway.com/docs/index.php/Collapsible_sidebar_menus

But correct in the javascript to prevent the  e.preventDefault();

jQuery(‘.menu .dropdown a’).click(function(e){
if (jQuery(this).parent().hasClass(“dropdown”)) {
e.preventDefault();
if (jQuery(this).parent().children(‘.sub-menu:first’).is(‘:visible’)) {
jQuery(this).parent().children(‘.sub-menu:first’).hide();
} else {
jQuery(this).parent().children(‘.sub-menu:first’).show();
}
}
});

 

 

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s