Basic issue with jQuery Accordion

Wqowfwgeolkob

New Member
I am using a jQuery Accordion for my sidebar navigation. Currently I have 2 links which both have 'children' beneath them. Here is my jsFiddle: http://jsfiddle.net/6Eh8C/You'll notice that when you click 'About Us', the Gallery closes. This shouldn't happen. Gallery should only close when I click 'Gallery'.How do I fix this?Here is my jQuery:\[code\]jQuery(function($) { $('#accordion > li > a').click(function (e) { if ($(this).next('ul').length == 0) { // link is for navigation, do not set up accordion here return; } // link is for accordion pane //remove all the "Over" class, so that the arrow reset to default $('#accordion > li > a').not(this).each(function () { if ($(this).attr('rel')!='') { $(this).removeClass($(this).attr('rel') + 'Over'); } $(this).siblings('ul').slideUp("slow"); }); //showhide the selected submenu $(this).siblings('ul').slideToggle("slow"); //addremove Over class, so that the arrow pointing downup $(this).toggleClass($(this).attr('rel') + 'Over'); e.preventDefault(); }); $('.slides_item').children('div').css('background','#ededed') });\[/code\]Many thanks for any pointers :-)
 
Back
Top