aktuelle.kurse/m133/5_Vorlagen-und-Loesungen/buecherverwaltung/general/scroll_up.php

15 lines
331 B
PHP
Raw Normal View History

2022-03-17 11:19:26 +01:00
<a href="#" class="scrollicon"><img src="images/scrollup.png"/></a>
<script>
$(window).scroll(function(){
if ($(this).scrollTop() > 80) {
$('.scrollicon').fadeIn();
} else {
$('.scrollicon').fadeOut();
}
});
$('.scrollicon').click(function(){
$("html, body").animate({ scrollTop: 0 }, 1200);
return false;
});
</script>