Not Solved [Flatty Theme] How to re-add the blue scroll button
#1
Not Solved
In my recent editing on the Flatty theme for my forum, I accidentally removed the blue scroll button that came with the Flatty theme.

[Image: 910cd0071a7afae06de2dc7a7536841d.png]

Does anyone know the code for it, and where exactly I have to put it?
Reply
#2
Not Solved
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>".
Reply
#3
Not Solved
Thank you! Big Grin
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)