File size: 987 Bytes
e0e0cec | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 | document.addEventListener('DOMContentLoaded', function() {
// Initialize tooltips if needed
const tooltipTriggerList = [].slice.call(document.querySelectorAll('[data-bs-toggle="tooltip"]'));
tooltipTriggerList.map(function (tooltipTriggerEl) {
return new bootstrap.Tooltip(tooltipTriggerEl);
});
// Smooth scrolling for anchor links
document.querySelectorAll('a[href^="#"]').forEach(anchor => {
anchor.addEventListener('click', function (e) {
e.preventDefault();
document.querySelector(this.getAttribute('href')).scrollIntoView({
behavior: 'smooth'
});
});
});
// Auto-save demo (for exam interface)
if (document.getElementById('exam-interface')) {
setInterval(function() {
console.log('Auto-saving exam progress...');
// In a real implementation, this would save to local storage or API
}, 10000); // Every 10 seconds
}
}); |