Skip to content

Commit

Permalink
Merge pull request johnpolacek#9 from apotropaic/master
Browse files Browse the repository at this point in the history
added background-position and text-shadow property
  • Loading branch information
johnpolacek committed Mar 4, 2012
2 parents 43db527 + 30343fc commit 96c730d
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions js/jquery.scrollorama.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
/*
Expand Down

0 comments on commit 96c730d

Please sign in to comment.