Thread Starter
Jorge
(@ganix33)
I’d like to bind an action to a button so inline fancybox will be launched on click event.
Hi @ganix33 – To clarify, are you just wanting to have it so if a visitor clicks on a button, it will open a modal with your inline content? If so, does this article address your needs?
https://firelightwp.com/wordpress-lightbox-docs/show-inline-content-in-lightbox/
In short, you (1) add a unique ID and the fancybox-hidden CSS class to the container that has your inline content, and then (2) link the button to that ID, and add a fancybox-inline CSS class to the button so our lightbox will detect it.
Just following up to see if this worked? Also, since I think we (hopefully) addressed the question, I’m going to mark this resolved. But obviously feel free to follow up with more questions if needed.