Template:Team:Berkeley/scrollspyOffset.js

From 2013.igem.org

Revision as of 16:39, 28 October 2013 by Tnrich (Talk | contribs)

var offset = 80;

$('#navbar li a').click(function(event) {

   event.preventDefault();
   $($(this).attr('href'))[0].scrollIntoView();
   scrollBy(0, -offset);

});