Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $(window).scroll(function(){
- if ($(this).scrollTop()>100 {
- var $upbutton = $('#upbutton');
- if ($upbutton.is(':hidden')){
- $upbutton.css({opacity:1}).fadeIn('slow');
- }
- } else{ $('#upbutton').stop(true, false).fadeOut('fast');}
- });
- $( '#upbutton').click(function(){
- $('html, body').stop().animate({scrollTop: 0}, 300);
- });
Add Comment
Please, Sign In to add comment