Template:Paris/Toggle

From 2008.igem.org

(Difference between revisions)
 
(24 intermediate revisions not shown)
Line 1: Line 1:
-
<html>
 
-
<script type="text/javascript">
 
-
function toggleNext(el) {
 
-
var next=el.nextSibling;
 
-
while(next.nodeType != 1) next=next.nextSibling;
 
-
next.style.display=((next.style.display=="none") ? "block" : "none");
 
-
}
 
-
 
-
function getElementsByTagAndClassName(tag,cname) {
 
-
var tags=document.getElementsByTagName(tag);
 
-
var cEls=new Array();
 
-
for (i=0; i<tags.length; i++) {
 
-
  var rE = new RegExp("(^|\s)" + cname + "(\s|$)");
 
-
  if (rE.test(tags[i].className)) {
 
-
  cEls.push(tags[i]);
 
-
  }
 
-
  }
 
-
return cEls;
 
-
}
 
-
function toggleNextByTagAndClassName(tag,cname) {
 
-
var ccn="button";
 
-
clickers=getElementsByTagAndClassName(tag,cname);
 
-
for (i=0; i<clickers.length; i++) {
 
-
  clickers[i].className+=" "+ccn;
 
-
  clickers[i].onclick=function() {toggleNext(this)}
 
-
  toggleNext(clickers[i]);
 
-
}
 
-
}
 
-
window.onload=function(){toggleNextByTagAndClassName('div','toggleswitch')}
 
-
</script>
 
<div class="toggleswitch">↓ {{{1}}} ↑</div>
<div class="toggleswitch">↓ {{{1}}} ↑</div>
-
<div></html>
+
<div class="toggled" style="margin: auto; width: {{{3|935px;}}}">
-
    {{:Team:Paris/{{{2}}}}}
+
 
-
<html></div>
+
 
-
</html>
+
{|cellspacing="2" cellpadding="10" style="background: black;" width=100%
 +
|-valign="top"
 +
|style="background: white;"|
 +
{{:{{{2}}}}}
 +
|}
 +
</div>

Latest revision as of 23:26, 29 October 2008

↓ {{{1}}} ↑


{{:{{{2}}}}}