Template:Team:TU Munich/ExCol

From 2012.igem.org

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

Revision as of 20:16, 23 September 2012