Team:TU Munich/Templates/Layout

From 2010.igem.org

(Difference between revisions)
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");
 +
}
}
}
-
var prevElem = $(this).prev();
 
-
while(prevElem!= null) {
 
-
if(!prevElem.is("p.trigger")) {
 
-
prevElem = prevElem.prev();
 
-
}
 
-
else {
 
-
break;
 
-
}
 
-
}
 
-
if(prevElem.is("p.trigger")) {
 
-
prevElem.toggleClass("activeToggle");
 
-
}
 

Revision as of 09:57, 21 October 2010