Tagged: Lightbox, Magnific popup
-
AuthorPosts
-
May 4, 2020 at 12:02 am #1209358
Is there any way to register a JavaScript callback for when the Magnific Popup Lightbox changes images? Alternatively, is there a trick to register a click handler for the on-screen Lightbox navigation controls? Attempts I have made to do the later have failed for some reason.
Thank you.
Gary
May 4, 2020 at 7:22 am #1209433Maybe you first describe what you want to achieve.
May 9, 2020 at 10:54 pm #1211524Hi,
Sorry for the late reply, the Magnific Popup Lightbox has quite a few options but I didn’t see what you have asked for. Perhaps one of the other options will help or try to describe what you want to achieve.Best regards,
MikeMay 10, 2020 at 6:08 pm #1211680Thanks Mike.
My read on the Magnific Popup Lightbox documentation is that there is in fact a way to register callbacks for certain events, but it seems you must do this when the MFP class object is created, or at least, you must have a reference to the MFP object. to do so. Enfold creates the Lightbox automagically, and I’m not sure how to get a reference to it, or if this is even possible.
Some possibly relevant API documentation is here:
https://dimsemenov.com/plugins/magnific-popup/documentation.html#api
I have a bit of programming background, but am a strict amateur when it comes to JavaScript, so I don’t know if getting this reference dynamically at runtime should be obvious or simple. If so, I apologize in advance.
Of course, my understanding could be entirely wrong.
- This reply was modified 4 years, 7 months ago by garyvot.
May 10, 2020 at 6:40 pm #1211684Yes – but what is the thing you like to build?
we can have solutions if we know what you like to do.different markup, Title styling, gallery-groups etc. pp.
see here a better page with complex influence on popup high selectiv for that masonry – for description: https://webers-testseite.de/pureinstall/masonry-gallery/
selector is a custom-class and masonry with lightbox : .av-masonry.lightbox-with-description a.av-masonry-entry.lightbox-added- This reply was modified 4 years, 7 months ago by Guenni007.
May 12, 2020 at 12:31 pm #1212126Hi,
Thank you, @Guenni007 for the example page with code snippets.Best regards,
MikeMay 13, 2020 at 7:16 pm #1212715Hi, thank you @guenni007 for the assistance. I appreciate it.
You guys can close this. I have abandoned this line of development for now. Thanks again.
May 14, 2020 at 12:01 pm #1212920 -
AuthorPosts
- The topic ‘Lightbox Change Event or Click Handler?’ is closed to new replies.