Difference between revisions of "Team:Warwick/Modelling2"

Line 114: Line 114:
 
</div>
 
</div>
 
</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 = $(this).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>
 +
  
 
</html>
 
</html>
  
 
{{WarwickFooter}}
 
{{WarwickFooter}}

Revision as of 13:28, 2 September 2015

Warwick iGEM 2015