Skip to content
Browse files

Merge pull request #9 from apotropaic/master

added background-position and text-shadow property
  • Loading branch information...
2 parents 43db527 + 30343fc commit 96c730da018629cf64d67a370f3178ffd7d7fa9b @johnpolacek johnpolacek committed Mar 4, 2012
Showing with 13 additions and 0 deletions.
  1. +13 −0 js/jquery.scrollorama.js
View
13 js/jquery.scrollorama.js
@@ -176,11 +176,24 @@
target.css('zoom', scaleCSS);
}
}
+ }
+ else if(prop === 'background-position-x' || prop === 'background-position-y' ){
+ var currentPosition = target.css('background-position').split(' ');
+ if(prop === 'background-position-x'){
+ target.css('background-position',val+'px '+currentPosition[1])
+ }
+ if(prop === 'background-position-y'){
+ target.css('background-position',currentPosition[0]+' '+val+'px')
+ }
+ }
+ else if(prop === 'text-shadow' ){
+ target.css(prop,'0px 0px '+val+'px #ffffff');
} else {
target.css(prop, val);
}
}
+
// PUBLIC FUNCTIONS
scrollorama.animate = function(target) {
/*

0 comments on commit 96c730d

Please sign in to comment.
Something went wrong with that request. Please try again.