PageSourceSearch

https://fabrika-meha.ru/wp-content/themes/fm/js/scroll_to_top.js?v=1791582115&ver=ef2c54ca7426

js fabrika-meha.ru collected 2026-10-09 22:45:47 UTC 815 bytes, 30 lines download raw bytes

1(function($){
2/**
3 * Toggle the visibility of the scroll to top link.
4 */
5
6// Если кнопка еще не добавлена — добавляем
7 if ($('#back-top').length === 0) {
8   $('body').append(
9	 "<p id='back-top' style='display:none;'>" +
10	   "<a href='#top'><span id='button'></span><span id='link'>Наверх</span></a>" +
11	 "</p>"
12   );
13 }
14
15 // Показываем/скрываем кнопку при прокрутке
16 $(window).scroll(function(){
17   if ($(this).scrollTop() > 100) {
18	 $('#back-top').fadeIn();
19   } else {
20	 $('#back-top').fadeOut();
21   }
22 });
23
24 // При клике — плавная прокрутка к началу страницы
25 $('#back-top a').on('click', function(e){
26   e.preventDefault();
27   $('body, html').animate({scrollTop: 0}, 800);
28 });
29
30})(jQuery);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.