Forums
Home / Plugin: Easy FancyBox - WordPress Lightbox Plugin / dynamic html
(@wpshushu)
2 years, 2 months ago
Hi,
Is there a way to initialize fancybox links inserted into DOM dynamically?
<a href="/url" class="button fancybox-iframe">Dynamic Button</a>
Thanks Shawn
(@ravanh)
Hi, Easy FancyBox is programmed to listen for the event “post-load” used by plugins like Infinite Scroll (Jetpack) for example. You can use that event to have Easy FancyBox rescan the DOM for media links after inserting new elements.
@ravanh Thank you! Works like a charm.