mirror of
https://github.com/lidarr/lidarr.git
synced 2025-08-19 13:10:13 -07:00
fixed ToTheTop
This commit is contained in:
parent
0934900cab
commit
77fdd724f4
3 changed files with 24 additions and 2072 deletions
|
@ -1,21 +1,24 @@
|
|||
var $ = require('jquery');
|
||||
require('bootstrap');
|
||||
var _ = require('underscore');
|
||||
|
||||
module.exports = (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;
|
||||
});
|
||||
|
||||
$(document).ready(function(){
|
||||
var _window = $(window);
|
||||
var _scrollButton = $('#scroll-up');
|
||||
|
||||
var _scrollHandler = function(){
|
||||
if(_window.scrollTop() > 100) {
|
||||
_scrollButton.fadeIn();
|
||||
}
|
||||
else {
|
||||
_scrollButton.fadeOut();
|
||||
}
|
||||
};
|
||||
|
||||
$(window).scroll(_.throttle(_scrollHandler, 500));
|
||||
_scrollButton.click(function(){
|
||||
$('html, body').animate({scrollTop : 0}, 600);
|
||||
return false;
|
||||
});
|
||||
}).call(this);
|
||||
});
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue