Team:StanfordBrownSpelman/jquery.scroll

From 2014.igem.org

(Difference between revisions)
Line 12: Line 12:
         scrollTop: $("#place").offset().top + 15
         scrollTop: $("#place").offset().top + 15
     }, 700);
     }, 700);
 +
    e.preventDefault();
     });
     });
      
      

Revision as of 18:25, 21 August 2014

$(document).ready(function() {

$("#team").click(function() {

   $('body, html').animate({
       scrollTop: $("#teamNoodle").offset().top
   }, 700);
   e.preventDefault();
   });

$("#projects").click(function() {

   $('body, html').animate({
       scrollTop: $("#place").offset().top + 15
   }, 700);
   e.preventDefault();
   });
   

$("#wiki").click(function() {

   $('body, html').animate({
       scrollTop: $("#splash").offset().top
   }, 700);
   e.preventDefault();
   });
   

$("#contact").click(function() {

   $('body, html').animate({
       scrollTop: $("#precontact").offset().top
   }, 700);
   e.preventDefault();
   });
   

$("#pics").click(function() {

   $('body, html').animate({
       scrollTop: $("#images").offset().top
   }, 700);
   e.preventDefault();
   });
   

$("#data").click(function() {

   $('body, html').animate({
       scrollTop: $("#results").offset().top
   }, 700);
   e.preventDefault();
   });
   

$("#methods").click(function() {

   $('body, html').animate({
       scrollTop: $("#process").offset().top
   }, 700);
   e.preventDefault();
   });
   

$("#links").click(function() {

   $('body, html').animate({
       scrollTop: $("#references").offset().top
   }, 700);
   e.preventDefault();
   });

$("#top").click(function() {

   $('body, html').animate({
       scrollTop: $("#header").offset().top - $("#header").height()
   }, 700);
   e.preventDefault();
   });

$("#contact").click(function() {

   $('body, html').animate({
       scrollTop: $("#test2").offset().top
   }, 700);
   e.preventDefault();  
   });
            });