Spaces:
Sleeping
Sleeping
Update static/script.js
Browse files- static/script.js +18 -1
static/script.js
CHANGED
|
@@ -41,7 +41,24 @@ function initNavigation() {
|
|
| 41 |
});
|
| 42 |
}
|
| 43 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 44 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 45 |
// ===== SCROLL ANIMATIONS =====
|
| 46 |
function initScrollAnimations() {
|
| 47 |
const observer = new IntersectionObserver((entries) => {
|
|
@@ -205,7 +222,7 @@ async function generateExplanations() {
|
|
| 205 |
}
|
| 206 |
}
|
| 207 |
function displayResults() {
|
| 208 |
-
const resultsSection = document.getElementById('results');
|
| 209 |
const container = document.getElementById('resultsContainer');
|
| 210 |
|
| 211 |
console.log('🎯 displayResults() called');
|
|
|
|
| 41 |
});
|
| 42 |
}
|
| 43 |
}
|
| 44 |
+
// Add this function for section navigation
|
| 45 |
+
function showSection(sectionId) {
|
| 46 |
+
// Hide all sections
|
| 47 |
+
document.querySelectorAll('.section').forEach(section => {
|
| 48 |
+
section.classList.remove('active');
|
| 49 |
+
});
|
| 50 |
+
|
| 51 |
+
// Show target section
|
| 52 |
+
const targetSection = document.getElementById(sectionId);
|
| 53 |
+
if (targetSection) {
|
| 54 |
+
targetSection.classList.add('active');
|
| 55 |
+
}
|
| 56 |
+
}
|
| 57 |
|
| 58 |
+
// Add this function to match your HTML button
|
| 59 |
+
function askQuestion() {
|
| 60 |
+
sendChatMessage(); // Just call your existing function
|
| 61 |
+
}
|
| 62 |
// ===== SCROLL ANIMATIONS =====
|
| 63 |
function initScrollAnimations() {
|
| 64 |
const observer = new IntersectionObserver((entries) => {
|
|
|
|
| 222 |
}
|
| 223 |
}
|
| 224 |
function displayResults() {
|
| 225 |
+
const resultsSection = document.getElementById('results-section');
|
| 226 |
const container = document.getElementById('resultsContainer');
|
| 227 |
|
| 228 |
console.log('🎯 displayResults() called');
|