Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <script>
- jQuery(document).ready(function () {
- $(window).scroll(function () {
- if ($(this).scrollTop() > 100) {
- $('.scrollup').fadeIn();
- } else {
- $('.scrollup').fadeOut();
- }
- });
- $('.scrollup').click(function () {
- $("html, body").animate({
- scrollTop: 0
- }, 600);
- return false;
- });
- });
- </script>
- <style>
- .scrollup {
- width: 45px;
- height: 44px;
- position: fixed;
- bottom: 30px;
- right: 140px;
- text-indent: -9999px;
- z-index:999;
- background: url('http://jay.avadaagency.com/wp-content/uploads/2016/05/up.png') no-repeat;
- }
- </style>
- <a href="#" class="scrollup">Scroll</a>
Add Comment
Please, Sign In to add comment