Kayzex's picture
Herşey Türkçe olsun sunucu galerisini daha fazla resim ekle hepsi Fivem ile alakaları olsun ve ana temayı mor ve daha iyi şekili bir renk yap ve join e basınca Fivem sunucuda atsın otomatik
0c6b869 verified
Raw History Blame Contribute Delete
1.06 kB
// Smooth scroll for anchor links
document.querySelectorAll('a[href^="#"]').forEach(anchor => {
anchor.addEventListener('click', function (e) {
e.preventDefault();
document.querySelector(this.getAttribute('href')).scrollIntoView({
behavior: 'smooth'
});
});
});
// Dynamic server stats counter (example)
const counters = document.querySelectorAll('.text-5xl');
const speed = 200;
counters.forEach(counter => {
const target = +counter.getAttribute('data-target');
const count = +counter.innerText;
const increment = target / speed;
if(count < target) {
counter.innerText = Math.ceil(count + increment);
setTimeout(updateCount, 1);
} else {
counter.innerText = target;
}
function updateCount() {
const current = +counter.innerText;
if(current < target) {
counter.innerText = Math.ceil(current + increment);
setTimeout(updateCount, 1);
} else {
counter.innerText = target;
}
}
});