Advertisement
anon

Untitled

Jul 5th, 2013
235
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.       <script type="text/javascript">
  2.         $(document).ready(function() {
  3.             $(window).scroll(function() {
  4.                         if ($(this).scrollTop() > 100) {
  5.                                 $('.scrollup').fadeIn();
  6.                         } else {
  7.                                 $('.scrollup').fadeOut();
  8.                         }
  9.                 });
  10.                 $('.scrollup').click(function() {
  11.                         $("html, body").animate({
  12.                                 scrollTop: 0
  13.                         }, 600);
  14.                         return false;
  15.                 });
  16.         });
  17.         </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement