Добавил динамическое обновление года в footer

This commit is contained in:
adlevin
2026-02-06 06:01:41 +03:00
parent 550c3b184a
commit 21361390d2
3 changed files with 21 additions and 206 deletions

View File

@@ -1,6 +1,9 @@
// Main JavaScript file for FIDEM Medical Center website
document.addEventListener('DOMContentLoaded', function() {
// Update year in footer
updateFooterYear();
// Mobile menu functionality
initMobileMenu();
@@ -23,6 +26,23 @@ document.addEventListener('DOMContentLoaded', function() {
initServiceModal();
});
// Update footer year
function updateFooterYear() {
const currentYear = new Date().getFullYear();
const startYear = 2025;
const yearSpan = document.getElementById('year');
const currentYearSpan = document.getElementById('current-year');
if (yearSpan) {
yearSpan.textContent = startYear;
}
if (currentYearSpan) {
currentYearSpan.textContent = currentYear;
}
}
// Mobile Menu
function initMobileMenu() {
const mobileMenuToggle = document.getElementById('mobile-menu-toggle');