17 lines
275 B
JavaScript
17 lines
275 B
JavaScript
$(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);
|
|
}
|
|
});
|
|
|
|
}); |