mirror of
https://github.com/mgrove36/bbc-young-reporter.git
synced 2026-03-03 03:17:07 +00:00
14 lines
349 B
JavaScript
14 lines
349 B
JavaScript
$(window).scroll(function() {
|
|
if ($(this).scrollTop() >= 55) {
|
|
$('.top-scroll-button').fadeIn(500);
|
|
}
|
|
if ($(this).scrollTop() < 55) {
|
|
$('.top-scroll-button').fadeOut(500);
|
|
}
|
|
});
|
|
function scrollUp() {
|
|
$('body, html, .mdc-drawer-app-content, #main-content, .mdc-top-app-bar--short-fixed-adjust').animate({
|
|
scrollTop: 0
|
|
}, 500);
|
|
}
|