Template:Team:TU Munich/ExCol

From 2012.igem.org

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

Latest revision as of 17:26, 26 September 2012