Mint: A Fresh Look at your Site Minted
  1. 1 /*
  2. 2 * Smooth scroll v1.2 | @agareginyan | GPL v3 Licensed
  3. 3 *
  4. 4 * Copyright (c) 2021, Space X-Chimp ( https://www.spacexchimp.com ).
  5. 5 * All Rights Reserved.
  6. 6 */
  7. 7
  8. 8
  9. 9 jQuery(document).ready(function($) {
  10. 10
  11. 11 $('.scroll-to-top').hide();
  12. 12
  13. 13 $(window).scroll(function() {
  14. 14 if ($(this).scrollTop() < 200) {
  15. 15 $('.scroll-to-top').fadeOut();
  16. 16 } else {
  17. 17 $('.scroll-to-top').fadeIn();
  18. 18 }
  19. 19 });
  20. 20
  21. 21 $('.scroll-to-top').on('click', function() {
  22. 22 $('html, body').animate({
  23. 23 scrollTop: 0
  24. 24 }, 'fast');
  25. 25 return false;
  26. 26 });
  27. 27
  28. 28 });
Bookmark: javascript:location='http://shauninman.com/vs/?url='+escape(location)