Template:Team:Berkeley/scrollspyOffset.js

From 2013.igem.org

(Difference between revisions)
Line 2: Line 2:
     e.preventDefault();
     e.preventDefault();
     $('html, body').animate({
     $('html, body').animate({
-
         scrollTop: $(this.hash).offset().top -190
+
         scrollTop: $(this.hash).offset().top -690
     }, 300);
     }, 300);
     // edit: Opera requires the "html" elm. animated
     // edit: Opera requires the "html" elm. animated
});
});

Revision as of 02:11, 28 October 2013

$('#navbar ul li a').bind('click', function(e) {

   e.preventDefault();
   $('html, body').animate({
       scrollTop: $(this.hash).offset().top -690
   }, 300);
   // edit: Opera requires the "html" elm. animated

});