Team:UCLA/Template/Javascript
From 2014.igem.org
(Difference between revisions)
Anuvedverma (Talk | contribs) |
Anuvedverma (Talk | contribs) |
||
(4 intermediate revisions not shown) | |||
Line 5: | Line 5: | ||
jQuery(document).ready(function($){ | jQuery(document).ready(function($){ | ||
$('.spiderbutton, .backtotop').click(function(){ | $('.spiderbutton, .backtotop').click(function(){ | ||
- | $('.spiderbutton').stop(true,true).animate({ top: '-= | + | $('.spiderbutton').stop(true,true).animate({ top: '-=55%'}, 800, function(){$('.spiderbutton').stop(true,true).animate({ top: '+=55%'}, 3000)}); |
- | $('.spiderline').stop(true,true).animate({ top: '-= | + | $('.spiderline').stop(true,true).animate({ top: '-=55%'}, 800, function(){$('.spiderline').stop(true,true).animate({ top: '+=55%'}, 3000)}); |
$("html, body").animate({ scrollTop: 0 }, 1000); | $("html, body").animate({ scrollTop: 0 }, 1000); | ||
}); | }); | ||
Line 216: | Line 216: | ||
count -= 1; | count -= 1; | ||
} else{ | } else{ | ||
- | $('.hpslider_imgs').stop(true,true).animate({ left: '+=20px'}, 100, function(){$('.hpslider_imgs').stop(true,true).animate({ left: '-=20px'}, 500)}); | + | $('.hpslider_imgs').stop(true,true).animate({ left: '-=16100px'}, 250); |
+ | count = 14; | ||
+ | // $('.hpslider_imgs').stop(true,true).animate({ left: '+=20px'}, 100, function(){$('.hpslider_imgs').stop(true,true).animate({ left: '-=20px'}, 500)}); | ||
} | } | ||
}); | }); | ||
$('.hpslider_right').click(function(){ | $('.hpslider_right').click(function(){ | ||
- | if(count < | + | if(count < 14){ |
$('.hpslider_imgs').stop(true,true).animate({ left: '-=1150px'}, 250); | $('.hpslider_imgs').stop(true,true).animate({ left: '-=1150px'}, 250); | ||
count += 1; | count += 1; | ||
} else{ | } else{ | ||
- | $('.hpslider_imgs').stop(true,true).animate({ left: '+= | + | $('.hpslider_imgs').stop(true,true).animate({ left: '+=16100px'}, 250); |
count = 0; | count = 0; | ||
} | } |
Latest revision as of 02:45, 18 October 2014