End of album reached, show "next" arrow and callback

15 views
Skip to first unread message

Matthew Klahorst

unread,
Aug 3, 2017, 10:30:16 AM8/3/17
to FancyBox

I am using jquery.fancybox-1.3.4.pack.js and query.fancybox-1.3.4.min.css with Wordpress Nextgen gallery.

We are using Nextgen in a multi-page gallery.

Current Setup:

When the user reaches the end of the lightbox gallery images, the appropriate behavior is that it doesn't show the NEXT arrow, as the gallery has ended.


Need to do:

When the user reaches the end of the lightbox gallery images, I want the next arrow to still display, and I want to fire a javascript callback to go to the next page (if available).  The callback function is something I can take care of in Nextgen docs (I think), but need to know:

- How to detect end of gallery images, and still show the next arrow
- When the next arrow is clicked, detect it being the last in the current gallery, and run a callback


The clarify, here are some screenshots:

- Gallery on page, pre-click:  http://d.pr/i/pYgj1p
- Clicking on middle image here: http://d.pr/i/OQ4vBt
- Everything works as it should: http://d.pr/i/nC08Br
- When I get to last image: http://d.pr/i/BsctbH
- I want a NEXT to still appear: http://d.pr/i/44N3bj
- And on click, since it's the last one, I want to fire a callback to switch pages here: http://d.pr/i/kS1lng (I can take care of that part)


Thanks in advance!
Reply all
Reply to author
Forward
0 new messages