$(document).ready(function(){
$("dt").click(function(){
$("dl").nextUntil("dl").find("a.open").addClass("closed");
$("dd").hide("fast");
$(this).next("dd").slideToggle("fast");
$(this).children("a").toggleClass("closed open");
return false;
});
});
I want to check where class is open and change it to closed between the dl tags…i can´t figure this one out and i´m stuck here…hope someone could give me a hint oder help me to solve this…nextuntil didn´t work…
–> if opened the color should be white
–> closed grey
Problem is, it stays white till you click one more time…i hope the problem is clear…
Change:
To:
http://jsfiddle.net/rV9D7/