Template:Team:Berkeley/scrollspyOffset.js
From 2013.igem.org
(Difference between revisions)
(Created page with " var offset = 80; $('.navbar li a').click(function(event) { event.preventDefault(); $($(this).attr('href'))[0].scrollIntoView(); scrollBy(0, -offset); });") |
|||
Line 1: | Line 1: | ||
- | + | var offset = 980; | |
- | var offset = | + | |
$('.navbar li a').click(function(event) { | $('.navbar li a').click(function(event) { |
Revision as of 01:42, 28 October 2013
var offset = 980;
$('.navbar li a').click(function(event) {
event.preventDefault(); $($(this).attr('href'))[0].scrollIntoView(); scrollBy(0, -offset);
});