mirror of
https://github.com/Prowlarr/Prowlarr.git
synced 2025-09-17 17:14:18 +02:00
added scroll to top button
This commit is contained in:
23
UI/jQuery/ToTheTop.js
Normal file
23
UI/jQuery/ToTheTop.js
Normal file
@@ -0,0 +1,23 @@
|
||||
'use strict';
|
||||
define(
|
||||
[
|
||||
'bootstrap'
|
||||
], function () {
|
||||
$(document).ready(function () {
|
||||
|
||||
$(window).scroll(function () {
|
||||
if ($(this).scrollTop() > 100) {
|
||||
$('#scroll-up').fadeIn();
|
||||
}
|
||||
else {
|
||||
$('#scroll-up').fadeOut();
|
||||
}
|
||||
});
|
||||
|
||||
$('#scroll-up').click(function () {
|
||||
$("html, body").animate({ scrollTop: 0 }, 600);
|
||||
return false;
|
||||
});
|
||||
|
||||
});
|
||||
});
|
Reference in New Issue
Block a user