I have made the accordion and its working fine but when it is slide down and when we click on it to slide upwards it doesn't go upward towards the closing position. Below is my code kindly tell how to proceed?
(function($) {
var allPanels = $('.accordion > dd').hide();
$('.accordion > dt > a').click(function() {
allPanels.slideUp();
$(this).parent().next().slideDown();
return false;
});
})(jQuery);
I think this is the issue you are sliding up the hidden elements
instead try this one: