Team:StanfordBrownSpelman/jquery.scroll

From 2014.igem.org

(Difference between revisions)
Line 73: Line 73:
$("#top2").click(function() {
$("#top2").click(function() {
     $('body, html').animate({
     $('body, html').animate({
-
         scrollTop: $("#int").offset().top}, 5);
+
         scrollTop: $("#int").offset().top}, 900);
     e.preventDefault();
     e.preventDefault();
     });
     });

Revision as of 18:39, 10 October 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();
   });

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

   $('body, html').animate({
       scrollTop: $("#int").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();
   });

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

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

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

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