Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <script type="text/javascript">
- var canSee = true;
- var scale = 0.50;
- $(window).on('resize', function() {
- var h = $(window).height()
- }
- );
- $(window).scroll(function() {
- if ($(this).scrollTop() > h * scale && canSee) {
- $("#logo").velocity(
- {
- backgroundPositionY: "-3402px"
- }, {
- easing: [ 54 ],
- duration: 1350,
- });
- canSee = false;
- } else if ($(this).scrollTop() <= h * scale && !canSee) {
- $("#logo").velocity(
- {
- backgroundPositionY: "0px"
- }, {
- easing: [ 54 ],
- duration: 1350,
- });
- canSee = true;
- }
- });
- </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement