Team:Cornell/sandbox
From 2013.igem.org
(Difference between revisions)
Line 328: | Line 328: | ||
if (e.which == 40 || e.which == 39) { | if (e.which == 40 || e.which == 39) { | ||
$(".parallax").each(function() { | $(".parallax").each(function() { | ||
- | var speed = | + | var speed = 10 * parseInt($(this).data('speed'), 10); |
$(this).animate( { left: '-=100%' }, speed); //move to the right | $(this).animate( { left: '-=100%' }, speed); //move to the right | ||
}); | }); | ||
Line 336: | Line 336: | ||
else if(e.which == 38 || e.which == 37) { | else if(e.which == 38 || e.which == 37) { | ||
$(".parallax").each(function() { | $(".parallax").each(function() { | ||
- | var speed = | + | var speed = 10 * parseInt($(this).data('speed'), 10); |
$(this).animate( { left: '+=100%' }, speed); //move to the left | $(this).animate( { left: '+=100%' }, speed); //move to the left | ||
}); | }); |
Revision as of 01:51, 30 December 2013