Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <img src="foo.jpg" id="parallax1" class="parallax">
- <style>
- .parallax {
- position : fixed;
- top : 0px;
- left : 0px;
- }
- </style>
- <script>
- var scroller = $('#parallax1');
- $(window).bind('scroll', function(){
- var top = this.scrollTop;
- $('#parallax1').css('top', top * someMultiplier);
- });
- </script>
Add Comment
Please, Sign In to add comment