Fix: subtopics hidden by default via CSS
This commit is contained in:
+8
-2
@@ -344,8 +344,14 @@ async function loadWiki() {
|
||||
// Toggle topic on click
|
||||
topicTitle.onclick = () => {
|
||||
console.log('Topic clicked:', topicName, 'current hidden:', subtopicsDiv.classList.contains('hidden'));
|
||||
subtopicsDiv.classList.toggle('hidden');
|
||||
console.log('After toggle, hidden:', subtopicsDiv.classList.contains('hidden'));
|
||||
// Subtopics should be hidden by default, show them when topic clicked
|
||||
if (subtopicsDiv.classList.contains('hidden')) {
|
||||
subtopicsDiv.classList.remove('hidden');
|
||||
console.log('Showing subtopics');
|
||||
} else {
|
||||
subtopicsDiv.classList.add('hidden');
|
||||
console.log('Hiding subtopics');
|
||||
}
|
||||
};
|
||||
|
||||
subtopics.forEach(sub => {
|
||||
|
||||
Reference in New Issue
Block a user