Team:Cornell/sandbox/design1
From 2013.igem.org
(Difference between revisions)
Line 347: | Line 347: | ||
$(".parallax").each(function() { | $(".parallax").each(function() { | ||
var speed = 10 * parseInt($(this).data('speed'), 10); | var speed = 10 * parseInt($(this).data('speed'), 10); | ||
- | $(this).animate( { left: '+= | + | $(this).animate( { left: '+=100%' }, speed); //move to the left |
}); | }); | ||
} | } | ||
Line 412: | Line 412: | ||
<h2> (Nupur's awesome) </h2> | <h2> (Nupur's awesome) </h2> | ||
</div> | </div> | ||
- | <div class="parallax layer2" data-speed="100" style="left: | + | <div class="parallax layer2" data-speed="100" style="left: 200%;"> |
<img src="http://testing.worldaccordingtorobert.com/jquery/jparallax/images/03_wood.png"> | <img src="http://testing.worldaccordingtorobert.com/jquery/jparallax/images/03_wood.png"> | ||
</div> | </div> | ||
- | <div class="parallax layer3" data-speed="120" style="left: | + | <div class="parallax layer3" data-speed="120" style="left: 200%;"> |
<img src="http://testing.worldaccordingtorobert.com/jquery/jparallax/images/02_hill.png"> | <img src="http://testing.worldaccordingtorobert.com/jquery/jparallax/images/02_hill.png"> | ||
</div> | </div> | ||
- | <div class="parallax layer4 data-speed="140" style="left: | + | <div class="parallax layer4" data-speed="140" style="left: 200%;"> |
<img src="http://testing.worldaccordingtorobert.com/jquery/jparallax/images/01_mountains.png"> | <img src="http://testing.worldaccordingtorobert.com/jquery/jparallax/images/01_mountains.png"> | ||
</div> | </div> |
Revision as of 03:07, 31 December 2013