Skip to content

Commit

Permalink
Use single quotes
Browse files Browse the repository at this point in the history
  • Loading branch information
alemart committed May 15, 2024
1 parent 104e3ef commit 1168367
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions inc/home.js
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
/* reveal on scroll */
window.addEventListener('load', function() {
if(typeof IntersectionObserver === "undefined")
if(typeof IntersectionObserver === 'undefined')
return;

const observer = new IntersectionObserver(function(entries) {
for(const entry of entries) {
if(entry.intersectionRatio >= 0.5)
entry.target.classList.remove("unrevealed");
entry.target.classList.remove('unrevealed');
else if(entry.intersectionRatio == 0.0)
entry.target.classList.add("unrevealed");
entry.target.classList.add('unrevealed');
}
}, { threshold: [0, 0.5] });

document.querySelectorAll(".reveal").forEach(function(reveal) {
document.querySelectorAll('.reveal').forEach(function(reveal) {
observer.observe(reveal);
});
});
Expand Down

0 comments on commit 1168367

Please sign in to comment.