Fix JavaScript error in showSection function
This commit is contained in:
@@ -1124,8 +1124,14 @@
|
|||||||
});
|
});
|
||||||
|
|
||||||
// Show selected section
|
// Show selected section
|
||||||
document.getElementById(section + 'Section').style.display = 'block';
|
const sectionElement = document.getElementById(section + 'Section');
|
||||||
document.querySelector(`[data-section="${section}"]`).classList.add('active');
|
if (sectionElement) {
|
||||||
|
sectionElement.style.display = 'block';
|
||||||
|
}
|
||||||
|
const navElement = document.querySelector(`[data-section="${section}"]`);
|
||||||
|
if (navElement) {
|
||||||
|
navElement.classList.add('active');
|
||||||
|
}
|
||||||
|
|
||||||
// Load section data
|
// Load section data
|
||||||
switch(section) {
|
switch(section) {
|
||||||
|
|||||||
Reference in New Issue
Block a user