Template:Team:TU Munich/MeetingHeader

From 2012.igem.org

(Difference between revisions)
Line 136: Line 136:
   $("#bodyContent h2").addClass("ui-corner-all");
   $("#bodyContent h2").addClass("ui-corner-all");
   $('h2 span.mw-headline').click(function() {
   $('h2 span.mw-headline').click(function() {
-
  if ($(this).hasClass('displayed')) {
+
  $('h2 span.mw-headline').click(function() {
-
    $(this).parent().parent().children('p').css({display: 'none'})
+
   $('#'+this.id).fadeToggle("slow", "linear")
-
    $(this).parent().parent().children('table').css({display: 'none'})
+
-
    $(this).parent().parent().children('ul').css({display: 'none'})
+
-
    $(this).parent().parent().children('pre').css({display: 'none'})
+
-
    $(this).removeClass('displayed')
+
-
   }else {
+
-
    $(this).parent().parent().children('p').css({display: 'block'})
+
-
    $(this).parent().parent().children('table').css({display: 'table'})
+
-
    $(this).parent().parent().children('ul').css({display: 'block'})
+
-
    $(this).parent().parent().children('pre').css({display: 'block'})
+
-
    $(this).addClass('displayed')
+
-
  }
+
   });
   });
   $('h2 span.mw-headline').attr({ onMouseOver: "this.style.cursor='pointer'"})
   $('h2 span.mw-headline').attr({ onMouseOver: "this.style.cursor='pointer'"})

Revision as of 12:34, 31 August 2012