800,000+ WordPress sites are already using MetaSlider!

Capture Slide Details with Javascript

One MetaSlider user wanted to use Javascript to capture the image file name when the user clicked on a slide. The aim was to get the name of the image file they selected and use it select the proper product variation in the site’s eCommerce store. This was possible using this Javascript code:


We hope that this code will be useful, but do not make guarantees. If you need troubleshooting help, or modifications to this code, please contact MetaSlider Pro support.