Skip to content

Commit

Permalink
chore: declare with let
Browse files Browse the repository at this point in the history
  • Loading branch information
PandorasActorMS committed May 14, 2024
1 parent 2c5fff6 commit 3a4e209
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/script.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ window.addEventListener('click', function(event) {

// Function to handle intersection changes
function handleIntersection(entries) {
var button = document.querySelector('.video-button');
let button = document.querySelector('.video-button');
entries.forEach(function(entry) {
if (entry.isIntersecting) {
button.style.transform = 'translate(0%)'; // Show the button
Expand All @@ -28,8 +28,8 @@ function handleIntersection(entries) {
}

// Create a new Intersection Observer
var container = document.querySelector('main ul');
var observer = new IntersectionObserver(handleIntersection);
let container = document.querySelector('main ul');
let observer = new IntersectionObserver(handleIntersection);

// Observe the container element
observer.observe(container);
Expand Down

0 comments on commit 3a4e209

Please sign in to comment.