mirror of
https://github.com/Readarr/Readarr.git
synced 2026-04-17 21:25:39 -04:00
Moved source code under src folder - massive change
This commit is contained in:
25
src/UI/jQuery/ToTheTop.js
Normal file
25
src/UI/jQuery/ToTheTop.js
Normal file
@@ -0,0 +1,25 @@
|
||||
'use strict';
|
||||
define(
|
||||
[
|
||||
'bootstrap'
|
||||
], function () {
|
||||
$(document).ready(function () {
|
||||
|
||||
var _window = $(window);
|
||||
var _scrollButton = $('#scroll-up');
|
||||
|
||||
$(window).scroll(function () {
|
||||
if (_window.scrollTop() > 100) {
|
||||
_scrollButton.fadeIn();
|
||||
}
|
||||
else {
|
||||
_scrollButton.fadeOut();
|
||||
}
|
||||
});
|
||||
|
||||
_scrollButton.click(function () {
|
||||
$("html, body").animate({ scrollTop: 0 }, 600);
|
||||
return false;
|
||||
});
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user