Difference between revisions of "Team:Warwick/Modelling2"

Line 115: Line 115:
 
</div>
 
</div>
  
<script>
 
$(document).ready(function () { 
 
  var top = $('#wrapper').offset().top - parseFloat($('#wrapper').css('marginTop').replace(/auto/, 100));
 
  $(window).scroll(function (event) {
 
    // what the y position of the scroll is
 
    var y = $(100).scrollTop();
 
  
    // whether that's below the form
 
    if (y >= top) {
 
      // if so, ad the fixed class
 
      $('#wrapper').addClass('fixed');
 
    } else {
 
      // otherwise remove it
 
      $('#wrapper').removeClass('fixed');
 
    }
 
  });
 
});
 
</script>
 
  
  

Revision as of 13:37, 2 September 2015

Warwick iGEM 2015