Team:Cornell/sandbox

From 2013.igem.org

(Difference between revisions)
Line 327: Line 327:
//down or right
//down or right
if (e.which == 40 || e.which == 39) {  
if (e.which == 40 || e.which == 39) {  
-
if($("#far-right").left() > '100%') { //only scroll if we haven't reached the far right
+
if($("#far-right").css('left') > '100%') { //only scroll if we haven't reached the far right
$(".parallax").each(function() {
$(".parallax").each(function() {
var speed = 10 * parseInt($(this).data('speed'), 10);
var speed = 10 * parseInt($(this).data('speed'), 10);
Line 339: Line 339:
//up or left
//up or left
else if(e.which == 38 || e.which == 37) {
else if(e.which == 38 || e.which == 37) {
-
if($("#far-left").left() < '0%') { //only scroll if we haven't reached the far left
+
if($("#far-left").css('left') < '0%') { //only scroll if we haven't reached the far left
$(".parallax").each(function() {
$(".parallax").each(function() {
var speed = 10 * parseInt($(this).data('speed'), 10);
var speed = 10 * parseInt($(this).data('speed'), 10);

Revision as of 02:08, 30 December 2013

Parallax Test

Whee

Project