/
Denkon
/
zarutsky
Обзор
Документация
Войти
/
Denkon
/
zarutsky
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
CI/CD
Аналитика
Безопасность
master
scripts/scripts.js
36 строк
978 B
Denkon
заливка файлов
24 янв 2026, 14:49
24 янв 2026, 14:49
6c93b9d
Код
Авторство
О чём код?
$(document).ready(function () { $("body").on("click", '[href*="#"]', function (e) { var fixed_offset = 100; $("html,body") .stop() .animate({ scrollTop: $(this.hash).offset().top - fixed_offset }, 1000); e.preventDefault(); }); $(".js-togglePaints").click(function () { $(this).toggleClass("active"); $(this).prev().find(".js-paintsListBlock").fadeToggle(); if ($(this).text().trim() === "СПИСОК КРАСОК") { $(this).text("СКРЫТЬ СПИСОК"); } else { $(this).text("СПИСОК КРАСОК"); } }); $(".payment-icons__icon").click(function () { let price = $(this).data("price"); let oldprice = $(this).data("old-price"); $(this).addClass("active").siblings().removeClass("active"); $(this) .parent() .parent() .find(".old-price") .text(oldprice + " " + $(this).text()) .next() .text(price + " " + $(this).text()); }); });