JS event on change of slide in carousel
-
Hi,
is there an event that fires when the slide changes in the carousel addon? I checked the code and noticed Flickity is used, but I had no success trying to access its
change
event.Thanks in advance,
Florian -
Dear @fbn
it is not really possible to access this.
Flickity is too integrated in the theme.Best!
Marius
-
Hi @mariusjopen,
thanks for your reply. So that means there is no way to run an action on image change of the carousel? Is there a way to enable Flickity so I can use its events?
Thanks,
Florian -
Dear @fbn
we are working on that regarding another question of a user.
Just a moment…:-)
Best!
Marius
-
-
:-D Thank you for your patience!
-
Hey!
Yeah of course you can use flickity's events!
window.laytheme.on('newpageshown', function(){ jQuery('.lay-carousel.transition-sliding').on('select.flickity', function(event){ var flkty = Flickity.data( event.target ); var ix = flkty.selectedIndex; console.log('do sth'); }); });
-
Before you post
Use the Search Feature. Maybe there is already a solution to your issue.
1. Update Lay Theme and all Lay Theme Addons
2. Disable all Plugins
3. Go to Lay Options → Custom CSS & HTML, click "Turn Off All Custom Code ", click "Save Changes"
4. Now see if your problem solved itself
5. Go here, see if your problem is listed here:
Troubleshooting
When you post:
1. Post a link to where the problem is
2. If the problem is difficult to explain, post screenshots / link to a video to explain it