Template:Team:TU Munich/ExCol

From 2012.igem.org

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

Revision as of 20:46, 23 September 2012