15 lines
539 B
JavaScript
15 lines
539 B
JavaScript
document.addEventListener('DOMContentLoaded', function() {
|
|
// Solution cards - open with toggle button
|
|
document.querySelectorAll('.solution-toggle').forEach(function(btn) {
|
|
btn.addEventListener('click', function() {
|
|
this.closest('.solution-card').classList.add('open');
|
|
});
|
|
});
|
|
|
|
// Solution cards - close with X button
|
|
document.querySelectorAll('.solution-close').forEach(function(btn) {
|
|
btn.addEventListener('click', function() {
|
|
this.closest('.solution-card').classList.remove('open');
|
|
});
|
|
});
|
|
}); |