I know, this question have been asked for hundred times but none of the solutions did help me actually.
Scroll Top does not work on firefox but it does in chrome and safari.
here my js
function scroll_top (){
$("body").append("<div id='scroll-top'><i class='fa fa-angle-up'></i></div>")
$('#scroll-top').on( 'click', function() {
$('html, body').animate({scrollTop: 0});
return false;
});
if( $(window).scrollTop() > 700 ) {
$('#scroll-top').fadeIn();
} else {
$('#scroll-top').fadeOut();
}
$(window).scroll(function(){
if( $(window).scrollTop() > 700 ) {
$('#scroll-top').fadeIn();
} else {
$('#scroll-top').fadeOut();
}
})
}
and my html
html, body {
width: 100%;
min-height: 100%;
-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
}
thank you in advance.