SW/root/assets/js/goUp.js

17 lines
275 B
JavaScript
Raw Normal View History

2021-07-02 17:59:22 +02:00
$(document).ready(function(){
$('.go-up').click(function(){
$('body, html').animate({
scrollTop: '0px'
}, 300);
});
$(window).scroll(function(){
if( $(this).scrollTop() > 0 ){
$('.go-up').slideDown(300);
} else {
$('.go-up').slideUp(300);
}
});
});