|
|
@ -5,19 +5,21 @@ define(
|
|
|
|
], function () {
|
|
|
|
], function () {
|
|
|
|
$(document).ready(function () {
|
|
|
|
$(document).ready(function () {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var _window = $(window);
|
|
|
|
|
|
|
|
var _scrollButton = $('#scroll-up');
|
|
|
|
|
|
|
|
|
|
|
|
$(window).scroll(function () {
|
|
|
|
$(window).scroll(function () {
|
|
|
|
if ($(this).scrollTop() > 100) {
|
|
|
|
if (_window.scrollTop() > 100) {
|
|
|
|
$('#scroll-up').fadeIn();
|
|
|
|
_scrollButton.fadeIn();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
else {
|
|
|
|
$('#scroll-up').fadeOut();
|
|
|
|
_scrollButton.fadeOut();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
$('#scroll-up').click(function () {
|
|
|
|
_scrollButton.click(function () {
|
|
|
|
$("html, body").animate({ scrollTop: 0 }, 600);
|
|
|
|
$("html, body").animate({ scrollTop: 0 }, 600);
|
|
|
|
return false;
|
|
|
|
return false;
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
});
|
|
|
|
});
|
|
|
|
});
|
|
|
|
});
|
|
|
|