Difference between revisions of "Team:Bielefeld-CeBiTec/Notebook/PlasmidDisplay"

(Extension of weeks and addition of dates)
Line 4: Line 4:
  
 
<body>
 
<body>
 +
 +
<div class="container">
 +
  <button type="button" class="btn btn-info" data-toggle="collapse" data-target="#demo">Expand all</button>
 +
  <div id="demo" class="collapse in">
 +
    Lorem ipsum dolor sit amet, consectetur adipisicing elit,
 +
    sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,
 +
    quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
 +
  </div>
 +
</div>
 +
 +
$(document).ready(function() {
 +
  $('.question').click(function() {
 +
 +
  if($(this).next().is(':hidden') != true) {
 +
                $(this).removeClass('active');
 +
    $(this).next().slideUp("normal");
 +
  } else {
 +
    $('.question').removeClass('active'); 
 +
    $('.answer').slideUp('normal');
 +
    if($(this).next().is(':hidden') == true) {
 +
    $(this).addClass('active');
 +
    $(this).next().slideDown('normal');
 +
    } 
 +
  }
 +
  });
 +
 +
  $('.answer').hide();
 +
 +
  $('.expand').click(function(event)
 +
    {$('.question').next().slideDown('normal');
 +
        {$('.question').addClass('active');}
 +
    }
 +
  );
 +
 +
  $('.collapse').click(function(event)
 +
    {$('.question').next().slideUp('normal');
 +
        {$('.question').removeClass('active');}
 +
    }
 +
  );
 +
});
  
 
<div class="container">
 
<div class="container">

Revision as of 12:21, 14 June 2015

iGEM Bielefeld 2015


Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
$(document).ready(function() { $('.question').click(function() { if($(this).next().is(':hidden') != true) { $(this).removeClass('active'); $(this).next().slideUp("normal"); } else { $('.question').removeClass('active'); $('.answer').slideUp('normal'); if($(this).next().is(':hidden') == true) { $(this).addClass('active'); $(this).next().slideDown('normal'); } } }); $('.answer').hide(); $('.expand').click(function(event) {$('.question').next().slideDown('normal'); {$('.question').addClass('active');} } ); $('.collapse').click(function(event) {$('.question').next().slideUp('normal'); {$('.question').removeClass('active');} } ); });