mirror of
https://github.com/lidarr/lidarr.git
synced 2025-07-14 00:53:57 -07:00
added scroll to top button
This commit is contained in:
parent
25581c8051
commit
272cc93bd2
4 changed files with 97 additions and 45 deletions
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;
|
||||
});
|
||||
|
||||
});
|
||||
});
|
Loading…
Add table
Add a link
Reference in a new issue