Team:UCLA/Template/Javascript
From 2014.igem.org
(Difference between revisions)
Anuvedverma (Talk | contribs) |
Anuvedverma (Talk | contribs) |
||
Line 54: | Line 54: | ||
$(document).ready(function(){ | $(document).ready(function(){ | ||
- | $( | + | $(document).keydown(function(e) { |
- | $("#spider").rotator(55, 1000, 'img'); | + | if(e.keyCode == 40){ |
- | + | $("#spider").rotator(55, 1000, 'img'); | |
- | + | $("#spider").animate({ | |
- | + | "top": "+=100px" | |
- | + | }, 1000); | |
- | + | } else if(e.keyCode == 38){ | |
- | + | $("#spider").rotator(55, 1000, 'img'); | |
- | + | $("#spider").animate({ | |
- | + | "top": "-=100px" | |
- | + | }, 1000); | |
+ | } | ||
}); | }); | ||
}); | }); |
Revision as of 00:31, 20 July 2014