Skip to content

Commit

Permalink
Floating agent
Browse files Browse the repository at this point in the history
  • Loading branch information
Ritwik Srivastava authored and Ritwik Srivastava committed Jun 4, 2024
1 parent 8fcc666 commit 94ba880
Showing 1 changed file with 0 additions and 18 deletions.
18 changes: 0 additions & 18 deletions blocks/floatingagent/floatingagent.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,21 +57,3 @@ export default function decorate(block) {

observer.observe(heroElement);
}

const displayedElement = document.querySelector('.floatingagent');

const heroElement = document.querySelector('.hero-wrapper');

const observer = new IntersectionObserver((entries) => {
entries.forEach((entry) => {
if (entry.isIntersecting) {
displayedElement.style.display = 'none';
} else {
displayedElement.style.display = 'flex';
}
});
}, {
threshold: [0],
});

observer.observe(heroElement);

0 comments on commit 94ba880

Please sign in to comment.