Team:TU Munich/Templates/Layout
From 2010.igem.org
(Difference between revisions)
Hartlmueller (Talk | contribs) |
Hartlmueller (Talk | contribs) |
||
Line 38: | Line 38: | ||
if(nextParent.is(".toggle_container")) { | if(nextParent.is(".toggle_container")) { | ||
nextParent.slideToggle("slow"); | nextParent.slideToggle("slow"); | ||
+ | |||
+ | |||
+ | |||
+ | var prevElem = nextParent.prev(); | ||
+ | while(prevElem!= null) { | ||
+ | if(!prevElem.is("p.trigger")) { | ||
+ | prevElem = prevElem.prev(); | ||
+ | } | ||
+ | else { | ||
+ | break; | ||
+ | } | ||
+ | } | ||
+ | if(prevElem.is("p.trigger")) { | ||
+ | prevElem.toggleClass("activeToggle"); | ||
+ | } | ||
} | } | ||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||