Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function EasyPeasyParallax() {
- scrollPos = jQuery(this).scrollTop();
- jQuery('#banner').css({
- 'background-position' : 'center ' + (-scrollPos/4)+"px"
- });
- jQuery('#bannertext').css({
- 'margin-top': (scrollPos/4)+"px",
- 'opacity': 1-(scrollPos/250)
- });
- }
- jQuery(document).ready(function(){
- jQuery(window).scroll(function() {
- EasyPeasyParallax();
- });
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement