Team:TU Munich/Templates/Layout
From 2010.igem.org
(Difference between revisions)
Hartlmueller (Talk | contribs) |
Hartlmueller (Talk | contribs) |
||
Line 12: | Line 12: | ||
$(this).toggleClass("activeToggle"); | $(this).toggleClass("activeToggle"); | ||
var nextElem = $(this).next(); | var nextElem = $(this).next(); | ||
- | while(nextElem!= null | + | while(nextElem!= null) { |
- | + | if(!nextElem.is(".toggle_container")) { | |
+ | nextElem = nextElem.next(); | ||
+ | } | ||
+ | else { | ||
+ | break; | ||
+ | } | ||
} | } | ||
if(nextElem.is(".toggle_container")) { | if(nextElem.is(".toggle_container")) { | ||
nextElem.slideToggle("slow"); | nextElem.slideToggle("slow"); | ||
- | } | + | } |
+ | |||
return false; //Prevent the browser jump to the link anchor | return false; //Prevent the browser jump to the link anchor | ||
}); | }); |