On mobile, the tooltip keeps showing once scrolled to the top. It won't go away unless you tap again elsewhere. Fixed JS here:
<script type="text/javascript"> $(document).ready(function(){
$(window).scroll(function () {
if ($(this).scrollTop() > 50) {
$('#back-to-top').tooltip();
$('#back-to-top').fadeIn();
} else {
$('#back-to-top').fadeOut();
$('#back-to-top').tooltip('hide');
}
});
// scroll body to 0px on click
$('#back-to-top').click(function () {
$('body,html').animate({
scrollTop: 0
}, 800);
return false;
});
});
</script>
PabloCarbonari (1) - 6 years ago - Reply 1