Template:Team:TU Munich/ExCol

From 2012.igem.org

(Difference between revisions)
(Undo revision 159468 by Fabian Froehlich (talk))
Line 3: Line 3:
$(document).ready(function() {
$(document).ready(function() {
-
$('h2').next('hr').next('div').prev().prev().append("<span style='font-size:50%;float:right;'class='excol'> [Expand]</span>")
+
$('h3').parent('div.bezel').children('h3').append("<span style='font-size:50%;float:right;'class='excol'> [Expand]</span>")
-
  $('h2').next('hr').next('div').prev().prev().attr({ onMouseOver: "this.style.cursor='pointer'"})
+
  $('h3').parent('div.bezel').children().not('h3').hide()
-
$('h2').next('hr').next('div').hide()
+
  $('h3').parent('div.bezel').children('h3').click(function() {
-
  $('h2').next('hr').next('div').prev().prev().click(function() {
+
   if( $(this).parent('div.bezel').children().not('h3').html() == ' [Expand]') {
-
   if( $(this).children('.excol').html() == ' [Expand]') {
+
   $(this).parent('div.bezel').children('h3').children('span').html(' [Collapse]')
-
   $(this).children('.excol').html(' [Collapse]')
+
   }else {
   }else {
-
   $(this).children('.excol').html(' [Expand]')
+
   $(this).parent('div.bezel').children('h3').children('span').html(' [Expand]')
   }
   }
-
   $(this).next('hr').next('div').fadeToggle()
+
   $(this).parent('div.bezel').children().not('h3').fadeToggle()
  });
  });
-
  $('h3').next('div').prev().append("<span style='font-size:50%;float:right;'class='excol'> [Expand]</span>")
+
  $('h3').parent('div.bezel').children('h3').attr({ onMouseOver: "this.style.cursor='pointer'"})
-
$('h3').next('div').not('.show').hide()
+
-
$('h3').next('div').prev().click(function() {
+
-
  if( $(this).children('.excol').html() == ' [Expand]') {
+
-
  $(this).children('.excol').html(' [Collapse]')
+
-
  }else {
+
-
  $(this).children('.excol').html(' [Expand]')
+
-
  }
+
-
  $(this).next('div').fadeToggle()
+
-
});
+
-
$('h3').next('div').prev().attr({ onMouseOver: "this.style.cursor='pointer'"})
+
-
$('h2').next('hr').next('div.show').prev().prev().click()
+
});
});
</script>
</script>
</html>
</html>

Revision as of 16:13, 26 September 2012