1
0
Fork 0
mirror of https://github.com/Sonarr/Sonarr synced 2024-12-26 17:57:43 +00:00
Sonarr/UI/jQuery/ToTheTop.js
2013-06-24 23:27:09 -07:00

25 lines
630 B
JavaScript

'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;
});
});
});