Team:Cornell/sandbox

From 2013.igem.org

(Difference between revisions)
Line 339: Line 339:
if (e.which == 40 || e.which == 39) {  
if (e.which == 40 || e.which == 39) {  
alert($("#second-last-screen").css('left'));
alert($("#second-last-screen").css('left'));
-
alert($("#second-last-screen").css('left') > '-1');
+
alert(parseInt($("#second-last-screen").css('left')) > -1);
-
if($("#second-last-screen").css('left') > '-1') { //only scroll if we haven't reached the far right
+
if(parseInt($("#second-last-screen").css('left')) > -1) { //only scroll if we haven't reached the far right
scroll($(".parallax, .screen"), 0);
scroll($(".parallax, .screen"), 0);
}
}
Line 349: Line 349:
//up or left
//up or left
else if(e.which == 38 || e.which == 37) {
else if(e.which == 38 || e.which == 37) {
-
if($("#first-screen").css('left') < '0') { //only scroll if we haven't reached the far left
+
if(parseInt($("#first-screen").css('left')) < 0) { //only scroll if we haven't reached the far left
scroll($(".parallax, .screen"), 1);
scroll($(".parallax, .screen"), 1);
}
}

Revision as of 20:06, 1 January 2014

Parallax Test

Parallax Design 1.2

Inspired by this site --->

(Yeah I stole the background)

Use the arrow keys to navigate -->

These pages can replace sliders

And have pretty pictures that link to project pages

This means design will be really important
It also takes a ton of time to set the page up cause I have to position everything manually
Whee!

Yay! Parallax

(Nupur's awesome)