![](https://premium.fancytemplates.com/wp-content/themes/bricks/assets/images/placeholder-image-800x600.jpg)
![](https://premium.fancytemplates.com/wp-content/themes/bricks/assets/images/placeholder-image-800x600.jpg)
![](https://premium.fancytemplates.com/wp-content/themes/bricks/assets/images/placeholder-image-800x600.jpg)
![](https://seosimplicity.com.au/wp-content/uploads/2023/12/App-Food-Entries.png)
Here goes your text
Lorem ipsum dolor sit amet, consectetur adipiscing elit.
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer nec odio. Praesent libero uctus non, massa. Sed cursus ante dapibus diam. Sed nisi. Nulla quis sem at nibh elementum imperdiet.
Duis sagittis ipsum. Praesent mauris himenaeos. Fusce nec tellus sed augue semper porta.
Here goes your text
Lorem ipsum dolor sit amet.
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer nec odio. Praesent libero uctus non, massa. Sed cursus ante dapibus diam. Sed nisi. Nulla quis sem at nibh elementum imperdiet.
Duis sagittis ipsum. Praesent mauris himenaeos. Fusce nec tellus sed augue semper porta. Vestibulum lacinia arcu eget nulla per conubia. Class aptent taciti sociosqu ad litora torquent. Curabitur sodales ligula in libero euismod in, nibh.
Here goes your text
Lorem ipsum dolor sit amet, consectetur adipiscing elit.
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer nec odio. Praesent libero uctus non, massa. Sed cursus ante dapibus diam. Sed nisi. Nulla quis sem at nibh elementum imperdiet.
Duis sagittis ipsum. Praesent mauris himenaeos. Fusce nec tellus sed augue semper porta.
Vestibulum lacinia arcu eget nulla per conubia. Class aptent taciti sociosqu ad litora torquent. Curabitur sodales ligula in libero euismod in, nibh.
Here goes your text
Lorem ipsum dolor sit amet.
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer nec odio. Praesent libero uctus non, massa. Sed cursus ante dapibus diam. Sed nisi. Nulla quis sem at nibh elementum imperdiet.
Duis sagittis ipsum. Praesent mauris himenaeos. Fusce nec tellus sed augue semper porta.
<script> const fbOptions = { root: null, rootMargin: '0px', threshold: 0.5 }; const handleIntersection = (entries, observer) => { entries.forEach(entry => { if (entry.isIntersecting) { const fbCard = entry.target; const fbIndex = Array.from(fbCard.parentNode.children).indexOf(fbCard); const fbImages = document.querySelectorAll('.fb-sticky-content__image-two'); const fbItems = document.querySelectorAll('.fb-sticky-content__item'); fbImages.forEach(fbImage => fbImage.classList.remove('fb-active')); fbItems.forEach(fbItem => fbItem.classList.remove('fb-active')); fbImages[fbIndex].classList.add('fb-active'); fbItems[fbIndex].classList.add('fb-active'); } }); }; const observeCards = () => { const fbObserver = new IntersectionObserver(handleIntersection, fbOptions); const fbCards = document.querySelectorAll('.fb-sticky-content__card'); fbCards.forEach(fbCard => fbObserver.observe(fbCard)); }; const moveImages = () => { const isSmallScreen = window.innerWidth < 768; const images = document.querySelectorAll('.fb-sticky-content__image-two'); const cards = document.querySelectorAll('.fb-sticky-content__card'); if (isSmallScreen) { images.forEach((image, index) => cards[index].insertBefore(image, cards[index].childNodes[0])); } else { const graphic = document.querySelector('.fb-sticky-content__graphic'); images.forEach(image => graphic.appendChild(image)); } }; const smoothScroll = () => { const fbItems = document.querySelectorAll('.fb-sticky-content__item'); const fbCards = document.querySelectorAll('.fb-sticky-content__card'); fbItems.forEach((item, index) => { item.addEventListener('click', () => fbCards[index].scrollIntoView({ behavior: 'smooth', block: 'start' })); }); }; window.addEventListener('resize', () => { moveImages(); }); window.addEventListener('load', () => { moveImages(); observeCards(); smoothScroll(); }); </script>