generated from ubc-library-rc/template
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
055c51d
commit ca354d7
Showing
2 changed files
with
16 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,17 @@ | ||
document.addEventListener('DOMContentLoaded', function() { | ||
Reveal.on('slidechanged', function(event) { | ||
if (event.indexh === YOUR_SLIDE_INDEX) { | ||
document.getElementById('highlight-square').classList.add('active'); | ||
} else { | ||
document.getElementById('highlight-square').classList.remove('active'); | ||
const square1 = document.getElementById('highlight-square-1'); | ||
const square2 = document.getElementById('highlight-square-2'); | ||
|
||
// Clear all highlights | ||
square1.classList.remove('show'); | ||
square2.classList.remove('show'); | ||
|
||
// Highlight based on slide index | ||
if (event.indexh === 0) { // Example: Highlight first square on the first slide | ||
square1.classList.add('show'); | ||
} else if (event.indexh === 1) { // Example: Highlight second square on the second slide | ||
square2.classList.add('show'); | ||
} | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters