mercredi 9 novembre 2016

how to load dynamic elements into slider or slideshow

I want to create a page where the user can choose the images that will be shown in a slideshow. I'm attempting to use imgchecked.js and would like to use lightgallery.js.

How can I pass an array of images into the dynamicEL? Is there a way to load the images using the class imgchecked?

Any help is greatly appreciated. And apologies in advance for being new at coding.

Here is a jsfiddle that only seems to be slightly working in chrome: imgcheckbox with lightgallery - https://jsfiddle.net/ssab/cydgs40n/13/ Thanks

<div class="slides">
<ul>
 <li><img src="001.jpg" /></li>
 <li><img src="002.jpg" /></li>
 <li><img src="003.jpg" /></li>
 <li><img src="http://004.jpg/></li> </ul>
 <button id="dynamic" />Launch Gallery</button></div>

$(".slides img").imgCheckbox();

 $('#dynamic').on('click', function() {
       $(this).lightGallery({
           dynamic: true,
           dynamicEl: [{ }]
       })
   });

Aucun commentaire:

Enregistrer un commentaire