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>")
+
  $('h2').not('div.noexcol h2').append("<span style='font-size:50%;float:right;'class='excol col'> [Expand/Collapse]</span>")
-
  $('h2').attr({ onMouseOver: "this.style.cursor='pointer'"})
+
  $('h2').not('div.noexcol h2').attr({ onMouseOver: "this.style.cursor='pointer'"})
-
  $('h2').nextUntil('h2').hide()
+
  $('h2').not('div.noexcol h2').nextUntil('h2').hide()
-
  $('h2').click(function() {
+
  $('h2').not('div.noexcol h2').click(function() {
   $(this).nextUntil('h2').fadeToggle()
   $(this).nextUntil('h2').fadeToggle()
-
  console.log(this.localName)
 
  });
  });
-
  $('h3').append("<span style='font-size:50%;float:right;'class='excol col'> [Expand/Collapse]</span>")
+
  $('h3').not('div.noexcol h2').append("<span style='font-size:50%;float:right;'class='excol col'> [Expand/Collapse]</span>")
-
  $('h3').nextUntil('h3').hide()
+
  $('h3').not('div.noexcol h2').nextUntil('h3').hide()
-
  $('h3').click(function() {
+
  $('h3').not('div.noexcol h2').click(function() {
   $(this).nextUntil('h3').fadeToggle()
   $(this).nextUntil('h3').fadeToggle()
  });
  });
-
  $('h3').attr({ onMouseOver: "this.style.cursor='pointer'"})
+
  $('h3').not('div.noexcol h2').attr({ onMouseOver: "this.style.cursor='pointer'"})
});
});
</script>
</script>
</html>
</html>

Revision as of 20:23, 23 September 2012