Skip to content

Instantly share code, notes, and snippets.



Last active Mar 6, 2019
What would you like to do?
Back to Top on Beaver Builder
#toTop {
display: none;
position: fixed;
bottom: 5px;
right: 10px;
width: 80px;
height: 80px;
opacity: 0.8;
filter: alpha(opacity=40); /* For IE8 and earlier */
#toTop:after {
content: "\f343";
font-family: dashicons;
color: #fff;
background-color: rgba(191,48,0,.5);
font-size: 35px;
border-radius: 50%;
padding: 5px;
<a href="#top" id="toTop"></a>
$(function() {
jQuery scrollTopTop v1.0 - 2013-03-15
(c) 2013 Yang Zhao -
(function(a){a.fn.scrollToTop=function(c){var d={speed:800};c&&a.extend(d,{speed:c});return this.each(function(){var b=a(this);a(window).scroll(function(){100<a(this).scrollTop()?b.fadeIn():b.fadeOut()});{b.preventDefault();a("body, html").animate({scrollTop:0},d.speed)})})}})(jQuery);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment