Template:Team:TU Munich/ExCol

From 2012.igem.org

(Difference between revisions)
Line 5: Line 5:
  $('h2').append("<span style='font-size:50%;float:right;'class='excol col'> [Expand/Collapse]</span>")
  $('h2').append("<span style='font-size:50%;float:right;'class='excol col'> [Expand/Collapse]</span>")
  $('h2').attr({ onMouseOver: "this.style.cursor='pointer'"})
  $('h2').attr({ onMouseOver: "this.style.cursor='pointer'"})
-
  $('h2').nextUntil('div').hide()
+
  $('h2').nextUntil(this.localName).hide()
  $('h2').click(function() {
  $('h2').click(function() {
-
   $(this).nextUntil('div').fadeToggle()
+
   $(this).nextUntil(this.localName).fadeToggle()
  });
  });
  $('h3').append("<span style='font-size:50%;float:right;'class='excol col'> [Expand/Collapse]</span>")
  $('h3').append("<span style='font-size:50%;float:right;'class='excol col'> [Expand/Collapse]</span>")
-
  $('h3').nextUntil('div').hide()
+
  $('h3').nextUntil(this.localName).hide()
  $('h3').click(function() {
  $('h3').click(function() {
-
   $(this).nextUntil('div').fadeToggle()
+
   $(this).nextUntil(this.localName).fadeToggle()
  });
  });
  $('h3').attr({ onMouseOver: "this.style.cursor='pointer'"})
  $('h3').attr({ onMouseOver: "this.style.cursor='pointer'"})

Revision as of 20:15, 23 September 2012