Add a Back to Top Scroll Button on a Beaver Builder Page


Description: 

Here is a way to add a quick scroll to top icon on a particular Beaver Builder page, this will only load on the page in question as instead of enqueuing it in functions.php we’ll add the code straight to the custom CSS/JS boxes in the page builder.

 

<a href=”#top” id=”toTop”></a>




Kind:

CSS, HTML, jQuery


CSS:

#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;
}


Javascript:

jQuery(document).ready(function($){

$(function() {
$("#toTop").scrollToTop(800);
});

});

/*!
jQuery scrollTopTop v1.0 - 2013-03-15
(c) 2013 Yang Zhao - geniuscarrier.com
license: http://www.opensource.org/licenses/mit-license.php
*/
(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


URL: