Team:UCLA/Template
From 2013.igem.org
(Difference between revisions)
Dewalgupta (Talk | contribs) |
Dewalgupta (Talk | contribs) |
||
Line 14: | Line 14: | ||
var $bgobj = $(this); // assigning the object | var $bgobj = $(this); // assigning the object | ||
$(window).scroll(function() { | $(window).scroll(function() { | ||
- | var yPos = - | + | |
+ | var yPos = -($(window).scrollTop() / $bgobj.data('speed')); | ||
+ | |||
// Put together our final background position | // Put together our final background position | ||
var coords = '50% '+ yPos + 'px'; | var coords = '50% '+ yPos + 'px'; |
Revision as of 23:51, 25 September 2013