File manager - Edit - /var/www/html/homologParquetecmar/public/assets/js/custom.js
Back
$(function () { const buttons = document.querySelectorAll('.segment-card'); const startups = document.querySelectorAll('.startup-item'); const normalize = (str = "") => str.normalize('NFD').replace(/[\u0300-\u036f]/g, '').trim(); function showSegment(segment) { const segNorm = normalize(segment); startups.forEach(s => { const sSegNorm = normalize(s.getAttribute('data-segment')); s.classList.toggle('d-none', sSegNorm !== segNorm); }); } function setActiveButton(btn) { buttons.forEach(b => { const isActive = b === btn; b.classList.toggle('active', isActive); b.setAttribute('aria-pressed', isActive ? 'true' : 'false'); }); } buttons.forEach(btn => { btn.addEventListener('click', () => { setActiveButton(btn); showSegment(btn.dataset.segment); }); }); document.addEventListener("DOMContentLoaded", () => { const initial = document.querySelector('.segment-card.active') || buttons[0]; setActiveButton(initial); showSegment(initial.dataset.segment); }); // Header Scroll $(window).scroll(function () { if ($(window).scrollTop() >= 60) { $("header").addClass("fixed-header"); } else { $("header").removeClass("fixed-header"); } }); // Featured Owl Carousel: inicializado em pages/home.js (página inicial) // Count $('.count').each(function () { $(this).prop('Counter', 0).animate({ Counter: $(this).text() }, { duration: 1000, easing: 'swing', step: function (now) { $(this).text(Math.ceil(now)); } }); }); // ScrollToTop function scrollToTop() { window.scrollTo({ top: 0, behavior: 'smooth' }); } const btn = document.getElementById("scrollToTopBtn"); btn.addEventListener("click", scrollToTop); window.onscroll = function () { const btn = document.getElementById("scrollToTopBtn"); if (document.documentElement.scrollTop > 100 || document.body.scrollTop > 100) { btn.style.display = "flex"; } else { btn.style.display = "none"; } }; // Aos AOS.init({ once: true, }); }); const buttons = document.querySelectorAll('.segment-card'); const startups = document.querySelectorAll('.startup-item'); const normalize = (str = "") => str.normalize('NFD').replace(/[\u0300-\u036f]/g, '').trim(); function showSegment(segment) { const segNorm = normalize(segment); startups.forEach(s => { const sSegNorm = normalize(s.getAttribute('data-segment')); s.classList.toggle('d-none', sSegNorm !== segNorm); }); } function setActiveButton(btn) { buttons.forEach(b => { const isActive = b === btn; b.classList.toggle('active', isActive); b.setAttribute('aria-pressed', isActive ? 'true' : 'false'); }); } buttons.forEach(btn => { btn.addEventListener('click', () => { setActiveButton(btn); showSegment(btn.dataset.segment); }); }); document.addEventListener("DOMContentLoaded", () => { const initial = document.querySelector('.segment-card.active') || buttons[0]; setActiveButton(initial); showSegment(initial.dataset.segment); }); document.addEventListener("DOMContentLoaded", function () { const tabs = document.querySelectorAll('#myTab .nav-link'); const panes = document.querySelectorAll('.services-tab .tab-pane'); let currentIndex = 0; const intervalTime = 2500; setInterval(() => { tabs.forEach(tab => tab.classList.remove('active')); panes.forEach(pane => pane.classList.remove('active', 'show')); currentIndex = (currentIndex + 1) % tabs.length; const nextTab = new bootstrap.Tab(tabs[currentIndex]); nextTab.show(); panes[currentIndex].classList.add('active', 'show'); }, intervalTime); });
| ver. 1.4 |
Github
|
.
| PHP 8.3.28 | Generation time: 0.01 |
proxy
|
phpinfo
|
Settings