Jenny P
KPCKevin Powell - Community
•Created by Jenny P on 2/14/2025 in #front-end
Can a popover content be lazy-loaded?
I have a very large image that I want to show in a popover (or a JS modal/dialog), but I want the loading of the image to be delayed until the user clicks on the button so it does not affect load time. But because my image is above the fold, it's loading it immediately even though it's obviously not visible. Any thoughts?
3 replies
KPCKevin Powell - Community
•Created by Jenny P on 10/11/2023 in #front-end
Fancybox alternatives to modals
We currently use an older, free version of Fancybox to load images and forms in modal lightboxes. I was about to be all set to migrate to or program my own non-jquery-dependent solution, aaaaand now we're using pardot forms which are iframes. (Which we hate so much.) Can anyone recommend a good alternative to fancybox that handles images and iframes? The latest v5 of Fancybox seems like it's just a paid license now.
23 replies
KPCKevin Powell - Community
•Created by Jenny P on 8/25/2023 in #front-end
Help with scrolling submenu, IntersectionObserver
I'm rewriting some old code we had that used window.onScroll to set the active state of the current sub-section of the page. I'm trying to use IntersectionObserver, but with short sections, it's observing two active sections at once. Essentially I'm looking to mimic the behavior of the side nav on Mozilla: https://developer.mozilla.org/en-US/docs/Web/API/Element/scroll_event - it only marks a section as active when it's on the top close to the sticky menu. Anybody have any good resources or code with examples?? Thanks!
21 replies