[jQuery] preventing open element from being closed and reopened in accordion menu (not using accordion plugin)
Hi
I have a simple accordion menu and would like to prevent the already
open dd from being closed and reopened when clicked on.
eg.
$("#menu dt a").click(function(){
// only activate if dd is hidden so currently active block is not
reopened
if(hidden???) { $("#menu dd:visible").slideUp("slow"); }
$(this).parent().next().slideDown("slow").addClass("open");
return false;
});
Can anyone suggest how to test the state of the current element
I'm guessing $(this).parent().next().something? but don't know how to
get its current state
thanks
Brad