Template:Team:TU Munich/ExCol

From 2012.igem.org

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

Revision as of 20:34, 23 September 2012