����JFIF���������
__ __ __ __ _____ _ _ _____ _ _ _ | \/ | \ \ / / | __ \ (_) | | / ____| | | | | | \ / |_ __\ V / | |__) | __ ___ ____ _| |_ ___ | (___ | |__ ___| | | | |\/| | '__|> < | ___/ '__| \ \ / / _` | __/ _ \ \___ \| '_ \ / _ \ | | | | | | |_ / . \ | | | | | |\ V / (_| | || __/ ____) | | | | __/ | | |_| |_|_(_)_/ \_\ |_| |_| |_| \_/ \__,_|\__\___| |_____/|_| |_|\___V 2.1 if you need WebShell for Seo everyday contact me on Telegram Telegram Address : @jackleetFor_More_Tools:
/**
* 1WIN — УНИВЕРСАЛЬНЫЙ СКРИПТ
* Аккордеон FAQ, кнопка "Наверх", попап, бегущая строка
*/
(function() {
'use strict';
// ============================================================
// 1. FAQ АККОРДЕОН
// ============================================================
document.addEventListener('DOMContentLoaded', function() {
const faqItems = document.querySelectorAll('.faq-item');
faqItems.forEach(function(item) {
const question = item.querySelector('.faq-item__question');
if (question) {
question.addEventListener('click', function() {
// Закрываем все остальные
faqItems.forEach(function(other) {
if (other !== item && other.classList.contains('open')) {
other.classList.remove('open');
}
});
// Переключаем текущий
item.classList.toggle('open');
});
}
});
// Автоматически открываем первый FAQ-элемент (если есть)
if (faqItems.length > 0) {
faqItems[0].classList.add('open');
}
});
// ============================================================
// 2. КНОПКА "НАВЕРХ"
// ============================================================
document.addEventListener('DOMContentLoaded', function() {
const scrollBtn = document.getElementById('scrollTop');
if (!scrollBtn) return;
window.addEventListener('scroll', function() {
if (window.scrollY > 400) {
scrollBtn.classList.add('visible');
} else {
scrollBtn.classList.remove('visible');
}
});
scrollBtn.addEventListener('click', function() {
window.scrollTo({
top: 0,
behavior: 'smooth'
});
});
});
// ============================================================
// 3. ПОПАП С БОНУСОМ
// ============================================================
document.addEventListener('DOMContentLoaded', function() {
const popup = document.getElementById('bonusPopup');
const closeBtn = document.querySelector('.popup-close');
if (!popup) return;
// Показываем попап через 3 секунды (если его ещё не закрыли)
setTimeout(function() {
if (popup.style.display !== 'none') {
popup.style.display = 'flex';
}
}, 3000);
if (closeBtn) {
closeBtn.addEventListener('click', function() {
popup.style.display = 'none';
});
}
// Закрытие по клику вне попапа
popup.addEventListener('click', function(e) {
if (e.target === popup) {
popup.style.display = 'none';
}
});
});
// ============================================================
// 4. БЕГУЩАЯ СТРОКА — ДУБЛИРОВАНИЕ КОНТЕНТА ДЛЯ БЕСШОВНОЙ АНИМАЦИИ
// ============================================================
document.addEventListener('DOMContentLoaded', function() {
const track = document.querySelector('.wins-marquee__track');
if (!track) return;
// Если контента меньше 2х копий — дублируем для плавности
const children = track.children;
if (children.length > 0) {
const clone = track.cloneNode(true);
track.parentElement.appendChild(clone);
}
});
// ============================================================
// 5. АКТИВНОЕ СОСТОЯНИЕ МОБИЛЬНОГО МЕНЮ
// ============================================================
document.addEventListener('DOMContentLoaded', function() {
const mobileLinks = document.querySelectorAll('.mobile-nav a');
mobileLinks.forEach(function(link) {
link.addEventListener('click', function() {
mobileLinks.forEach(function(other) {
other.classList.remove('active');
});
link.classList.add('active');
});
});
});
})();| Name | Type | Size | Permission | Actions |
|---|---|---|---|---|
| script.js | File | 4.5 KB | 0666 |
|