1$(document).ready(function () { 2 const imgZakax = document.querySelector(".zakaz-img"); 3 const pageZakax = $(".page-zakaz"); 4 5 zakazFixed(); 6 function zakazFixed() { 7 if (imgZakax) { 8 let windowHeight = $(window).height(); 9 10 let heightZakaz = pageZakax.height(); 11 let topZakaz = pageZakax.offset().top; 12 let bottomZakaz = topZakaz + heightZakaz - windowHeight; 13 14 if (offsetTop >= bottomZakaz) { 15 imgZakax.classList.add("notFixed"); 16 } else { 17 imgZakax.classList.remove("notFixed"); 18 } 19 } 20 } 21 22 $(document).scroll(function () { 23 offsetTop = $(this).scrollTop(); 24 fixHeader(); 25 zakazFixed(); 26 btnTop(); 27 }); 28 let lastScrollTop = 0; 29 btnTop(); 30 function btnTop() { 31 let currentScroll = $(window).scrollTop(); 32 33 // ÐÑовеÑÑем: пÑокÑÑÑили болÑÑе 500px Ð ÑкÑоллим ввеÑÑ 34 if (currentScroll > 500 && currentScroll < lastScrollTop) { 35 $(".btn-top").fadeIn(300); 36 } else { 37 $(".btn-top").fadeOut(300); 38 } 39 40 // ÐбновлÑем ÑекÑÑÑÑ Ð¿Ð¾Ð·Ð¸ÑÐ¸Ñ Ð´Ð»Ñ ÑледÑÑÑей пÑовеÑки 41 lastScrollTop = currentScroll; 42 } 43 44 $(document).mouseup(function (e) { 45 let search = $("#search, .button.search-icon"); 46 0 === search.has(e.target).length && btnSearch(search); 47 let cart = $("#cart, .button.cart"); 48 0 === cart.has(e.target).length && btnCart(cart); 49 50 let account = $("#account, .button.account"); 51 0 === account.has(e.target).length && n(account); 52 53 // let present = $(".button.present-svg"); 54 // 0 === present.has(e.target).length && n(present); 55 56 let burger = $("#burger, .burger-menu"); 57 0 === burger.has(e.target).length && n(burger); 58 let rewPop = $(".rew-pop"); 59 0 === rewPop.has(e.target).length && n(rewPop); 60 let popup = $(".popup, #datepickers-container"); 61 0 === popup.has(e.target).length && n(popup); 62 let lkBtn = $(".lk-data .col1"); 63 0 === lkBtn.has(e.target).length && 64 $(".lk-data .col1").removeClass("col1-hover"); 65 // debugger; 66 let reviews = $(".page-reviews .swiper-slide"); 67 if ($(e.target).closest(".swiper-slide").length === 0) { 68 $(".page-reviews .swiper-slide").removeClass("active"); 69 } 70 }); 71 72 function n(e) { 73 if ($(e).hasClass("popup active")) { 74 let id = $(e).find("form"); 75 id[0].reset(); 76 id.find(".input").removeClass("error"); 77 $("body").removeClass("hidden"); 78 } 79 80 $(e).removeClass("active"); 81 $(e).children().children("form").removeClass("active send-ok send-error"); 82 clearTimeout(timeId); 83 } 84 85 function btnCart(e) { 86 $("#cart, .button.cart").removeClass("active"); 87 $("body").removeClass("hidden"); 88 } 89 function btnSearch(e) { 90 $("#search, .search-icon").removeClass("active"); 91 $("body").removeClass("hidden"); 92 } 93 94 $( 95 ".list-btn .button:not(.favorites):not(.present-svg), .burger-menu, .new-index .watch-all, .mini-menu .account",
96 ).click(function (event) { 97 if (!$(this).hasClass("btn0")) { 98 event.preventDefault(); 99 let name = $(this).attr("href"); 100 if ($(".cart__object").length > 3) { 101 $(".list_tovar_cart").addClass("big"); 102 } 103 if (name === "#account") { 104 $(".drop-down").removeClass("active"); 105 } 106 107 $(name).toggleClass("active"); 108 $(this).toggleClass("active"); 109 console.log(); 110 if ($(name).hasClass("active")) { 111 $("body").addClass("hidden"); 112 } else { 113 $("body").removeClass("hidden"); 114 } 115 } 116 }); 117 118 $(".js-reserve").click(function () { 119 $("#popup-reserve").addClass("active"); 120 $("body").addClass("hidden"); 121 $(".drop-down").removeClass("active"); 122 }); 123 124 $(".js-reserve-2").click(function () { 125 $("#popup-reserve-2") 126 .find("form") 127 .attr("data-name", $(this).attr("data-name")); 128 $("#popup-reserve-2").addClass("active"); 129 $("body").addClass("hidden"); 130 $(".drop-down").removeClass("active"); 131 }); 132 133 var offsetTop = $(this).scrollTop(); 134 let heightHeader = $(".top-menu").height(); 135 let widthWindow = $(window).width(); 136 137 $(".lk-data .col1 h4").click(function () { 138 $(".lk-data .col1").toggleClass("col1-hover"); 139 }); 140 141 fixHeader(); 142 143 function fixHeader() { 144 if (heightHeader < offsetTop) { 145 $(".page-header").addClass("fixed"); 146 } else { 147 $(".page-header").removeClass("fixed"); 148 } 149 } 150 151 $(".wrap__phone .circle-wrap, .wrap__phone p").click(function () { 152 $("#call-form").addClass("active"); 153 $("body").addClass("hidden"); 154 }); 155});
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.