Spaces:
Paused
Paused
Download js/main.js from thunder-lord/is-a: direct link, hf CLI and curl.
- Browser
- Download file 805 Bytes
-
https://huggingface.co/spaces/thunder-lord/is-a/resolve/main/js/main.js
- Command line
-
hf download hf://spaces/thunder-lord/is-a/js/main.js
-
curl -L -o main.js https://huggingface.co/spaces/thunder-lord/is-a/resolve/main/js/main.js
805 Bytes
| (function ($) { | |
| "use strict"; | |
| // Spinner | |
| var spinner = function () { | |
| setTimeout(function () { | |
| if ($('#spinner').length > 0) { | |
| $('#spinner').removeClass('show'); | |
| } | |
| }, 1); | |
| }; | |
| spinner(); | |
| // Back to top button | |
| $(window).scroll(function () { | |
| if ($(this).scrollTop() > 300) { | |
| $('.back-to-top').fadeIn('slow'); | |
| } else { | |
| $('.back-to-top').fadeOut('slow'); | |
| } | |
| }); | |
| $('.back-to-top').click(function () { | |
| $('html, body').animate({scrollTop: 0}, 1500, 'easeInOutExpo'); | |
| return false; | |
| }); | |
| // Sidebar Toggler | |
| $('.sidebar-toggler').click(function () { | |
| $('.sidebar, .content').toggleClass("open"); | |
| return false; | |
| }); | |
| })(jQuery); | |