Team:UCLA/anuved verma ucla2014 workspace/Javascript

From 2014.igem.org

(Difference between revisions)
Line 5: Line 5:
jQuery(document).ready(function($){
jQuery(document).ready(function($){
     $('.spiderbutton').click(function(){
     $('.spiderbutton').click(function(){
-
           $('.spiderbutton').animate({ top: '-=60%'}, 800, function(){$('.spiderbutton').animate({ top: '+=60%'}, 3000)});
+
           $('.spiderbutton').stop().animate({ top: '-=60%'}, 800, function(){$('.spiderbutton').stop().animate({ top: '+=60%'}, 3000)});
-
           $('.spiderline').animate({ top: '-=60%'}, 800, function(){$('.spiderline').animate({ top: '+=60%'}, 3000)});
+
           $('.spiderline').stop().animate({ top: '-=60%'}, 800, function(){$('.spiderline').stop().animate({ top: '+=60%'}, 3000)});
-
           $("html, body").animate({ scrollTop: 0 }, 500);
+
           $("html, body").stop().animate({ scrollTop: 0 }, 500);
     });
     });
});
});

Revision as of 21:06, 19 September 2014