You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
26 lines
630 B
26 lines
630 B
'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;
|
|
});
|
|
});
|
|
});
|