Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $(window).scroll(function(e){
- parallax();
- });
- function parallax(){
- var scrolled = $(window).scrollTop();
- $('.relative-background').css('top',-(scrolled*0.15)+'px'); // changing the class here
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement