Team:TU Munich/Templates/Layout

From 2010.igem.org

(Difference between revisions)
Line 11: Line 11:
$("p.trigger").click(function(){
$("p.trigger").click(function(){
$(this).toggleClass("activeToggle");
$(this).toggleClass("activeToggle");
-
var elems = $(this).siblings(".toggle_container");
+
var nextElem = $(this).next();
-
elems.first().slideToggle("slow");
+
while(nextElem!= null && !nextElem.is(".toggle_container")) {
-
+
nextElem = nextElem.next();
 +
}
 +
if(nextElem.is(".toggle_container")) {
 +
nextElem.slideToggle("slow");
 +
}
return false; //Prevent the browser jump to the link anchor
return false; //Prevent the browser jump to the link anchor
});
});

Revision as of 16:41, 19 October 2010