Skip to content

10 Study Snacks that are Better than Candy

The stretch from Halloween to New Years brings many opportunities to overindulge in sugar. Between all the celebrations (and all the leftovers from said celebrations), many of us may find it hard to avoid at school, work, and home. However, students prepping for final exams, projects, presentations, and other end-of-term deadlines and events need proper

document.addEventListener("DOMContentLoaded", function() { // Get all accordion toggle elements var accordions = document.querySelectorAll('.accordion-toggle'); // Add click event listeners to each accordion toggle accordions.forEach(function(accordion) { accordion.addEventListener('click', function() { // Get the panel-collapse element directly following this accordion-toggle var panelCollapse = this.nextElementSibling; // Check if this panel-collapse is currently open var isOpen = panelCollapse.classList.contains('open'); // Remove 'open' class from all panel-collapses accordions.forEach(function(acc) { var collapse = acc.nextElementSibling; collapse.classList.remove('open'); }); // Toggle 'open' class only on the clicked panel-collapse if (!isOpen) { panelCollapse.classList.add('open'); } }); }); });