Team:StanfordBrownSpelman/jquery.scroll

From 2014.igem.org

(Difference between revisions)
Line 1: Line 1:
$(document).ready(function() {
$(document).ready(function() {
-
var scrollSpeed = 700;
+
var scrollSpeed = 100;
$("#team").click(function() {
$("#team").click(function() {

Revision as of 18:50, 10 October 2014

$(document).ready(function() {

var scrollSpeed = 100;

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

   $('body, html').animate({
       scrollTop: $("#teamNoodle").offset().top
   }, scrollSpeed);
   return false;
   });

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

   $('body, html').animate({
       scrollTop: $("#place").offset().top + 15
   }, scrollSpeed);
   return false;
   });
   

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

   $('body, html').animate({
       scrollTop: $("#splash").offset().top
   }, scrollSpeed);
   return false;
   });
   

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

   $('body, html').animate({
       scrollTop: $("#precontact").offset().top
   }, scrollSpeed);
   return false;
   });
   

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

   $('body, html').animate({
       scrollTop: $("#images").offset().top
   }, scrollSpeed);
   return false;
   });

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

   $('body, html').animate({
       scrollTop: $("#int").offset().top
   }, scrollSpeed);
   return false;
   });
   

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

   $('body, html').animate({
       scrollTop: $("#results").offset().top
   }, scrollSpeed);
   return false;
   });
   

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

   $('body, html').animate({
       scrollTop: $("#process").offset().top
   }, scrollSpeed);
   return false;
   });
   

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

   $('body, html').animate({
       scrollTop: $("#references").offset().top
   }, scrollSpeed);
   return false;
   });

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

   $('body, html').animate({
       scrollTop: $("#header").offset().top - $("#header").height()
   }, scrollSpeed);
   return false;
   });

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

   $('body, html').animate({
       scrollTop: '0px'}, scrollSpeed);
   return false;
   });

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

   $('body, html').animate({
       scrollTop: $("#test2").offset().top
   }, scrollSpeed);
   return false; 
   });
            });