aktuelle.kurse/old_m133/5_Vorlagen-und-Loesungen/buecherverwaltung/general/scroll_up.php
Müller Harald 507e5da390 muh
2022-05-13 11:53:50 +02:00

15 lines
331 B
PHP

<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>