Team:UCLA/Template

From 2013.igem.org

(Difference between revisions)
Line 14: Line 14:
var $bgobj = $(this); // assigning the object
var $bgobj = $(this); // assigning the object
$(window).scroll(function() {
$(window).scroll(function() {
-
var yPos = -( ($(window).scrollTop() - $bgobj.offset().top) / $bgobj.data('speed'));
+
 
 +
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