SW/assets/js/goUp.js

16 lines
273 B
JavaScript
Raw Normal View History

2021-05-29 15:59:19 +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);
}
});
});