[jQuery] sliding menu - sliding problem
i am having trouble making my menu transition smoothly between
sections as i click.
i added the last line of code to this JS in order to automatically
close sections as i click on a new section (the original code did not
have it on the first and last lines); if i have "A" open and click on
"B", "A" jerks closed instead of smoothly closing as "B" opens. i am
100% n00b on this stuff so any assistance would be greatly
appreciated.
thanks in advance!!
$(document).ready(function()
{
// First we hide all exhibitis
$("#menu ul li.section-title").nextAll().hide();
// then the active exhibit is showed
$("#menu ul").each(function(){
$(this).find("li.active").prevAll().nextAll().show();
});
//This is the toggle function
$("#menu ul li.section-title").click(function(){
$(this).nextAll().slideToggle("fast");
$("#menu ul li.section-title").nextAll().hide();
});
});