Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <script>
- $(window).scroll(function(e) {
- var scrolled = $(window).scrollTop(),
- header = $('.site-header');
- header.css('top', -(scrolled) * 0.5 + 'px');
- if (scrolled > $(document).height() - $(window).height() - 470) {
- var scrollPos = scrolled - ($(document).height() - $(window).height() - 470);
- var position = scrollPos / 10;
- var opacity = (scrollPos * 1) / 470;
- }
- });
- </script>
Add Comment
Please, Sign In to add comment