wordpress/php-fpm/wordpress_files/themes/simple-catch/js/scrollup.js

18 lines
392 B
JavaScript
Raw Permalink Normal View History

2020-05-22 03:40:23 +02:00
jQuery(document).ready(function(){
jQuery("#scrollup").hide();
jQuery(function () {
jQuery(window).scroll(function () {
if (jQuery(this).scrollTop() > 100) {
jQuery('#scrollup').fadeIn();
} else {
jQuery('#scrollup').fadeOut();
}
});
jQuery('#scrollup').click(function () {
jQuery('body,html').animate({
scrollTop: 0
}, 500);
return false;
});
});
});