Last active
March 6, 2019 07:59
-
-
Save neilgee/6ddbf844e6b2004ca86c514a2ce24796 to your computer and use it in GitHub Desktop.
Back to Top on Beaver Builder
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<a href="#top" id="toTop"></a> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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<a(this).scrollTop()?b.fadeIn():b.fadeOut()});b.click(function(b){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