In my recent editing on the
Flatty theme for my
forum, I accidentally removed the blue scroll button that came with the Flatty theme.
Does anyone know the code for it, and where exactly I have to put it?
ACP » Templates & Styles » Templates » {Theme} Templates » Footer Templates
Add this at the very top:
<script type="text/javascript">
jQuery(function($) {
$("#backtop").hide();
$(window).scroll(function () {
if ($(this).scrollTop() > 400) {
$("#backtop").fadeIn(170);
} else {
$("#backtop").fadeOut(170);
}
});
$('.back-top').on( "click", function () {
$('html, body').animate({
scrollTop: 0
}, 700);
return false;
});
});
</script>
.. and this:
<a class="back-top"><span id='backtop'><i class="fa fa-angle-up"></i></span></a>
right above "<div id="footer">", after the two closing "</div>".