Home › Forums › Add-ons › Gallery Field › Flexslider onClick event? › Reply To: Flexslider onClick event?
Hi @danfloun,
Sorry, I assumed that you had already attempted to attach an click event to the image and it was not working.
This is not really in the scope of ACF support but I will do my best to help you out. On the page that you have the slider you will need to add some custom JavaScript that adds a click event to the image that will invoke the lightbox.
Without knowing how you have setup your slider or lightbox can’t really give you the exact code, but it will be something like this:
$(function() {
$('.slide-image-class').on('click', function() {
//Fire the lighbox code.
});
});
Hope this helps. 🙂
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Privacy Policy. If you continue to use this site, you consent to our use of cookies.