Loading multiple slides from a Data-attribute into Jquery Cycle 2

Trigger Slideshow 1 Trigger Slideshow 2

What is going on in this pen?

jQuery Cycle 2 is a pretty powerful plugin, and has the ability to add and remove slides. This pen demostrates how to trigger a slide show from a button, that contains multiple slides on a data-attribute. JSON is used to parse it and then spit back into the slideslide. Upon closing the slide show, all the slides are removed. See the Javascript comments for more details!

Back Story

For a current CMS managed project, the client's website has gallery, where each image triggers a slide show. This means roughly 20 seperate slide shows on a single page. This is a paired down version of said code that uses a single modal and single instance of jQuery Cycle on the entire page to repopulate the same slide show repeatedly.