sachinchoolur / lightslider

JQuery lightSlider is a lightweight responsive Content slider with carousel thumbnails navigation
http://sachinchoolur.github.io/lightslider/
MIT License
2.04k stars 1.52k forks source link

Implement lightGallery not working? #265

Open conmen80 opened 8 years ago

conmen80 commented 8 years ago

I try implement lightGallery into lightSlider, but it doesn't expand when click on the image, what is the issue?

`<link rel="stylesheet" href="lightslider.css"/>
 <link rel="stylesheet" href="lightgallery.css"/>
 <script src=jquery.min.js"></script>
 <script src="lightslider.js"></script> 
 <script src="lightgallery.min.js"></script> 
 <script>
 $(document).ready(function() {
      $('#image-gallery').lightSlider({
    gallery:true,
    item:1,
    loop:true,
    thumbItem:9,
    slideMargin:0,
    enableDrag: false,
    currentPagerPosition:'left',
    onSliderLoad: function(el) {
        el.lightGallery({
           selector: '#imageGallery .lslide'
        });
    }
      });
 });
 </script>

 <div class="item">            
     <div class="clearfix" style="max-width:474px;">
         <ul id="image-gallery" class="gallery list-unstyled">
             <li data-thumb="img/thumb/cS-1.jpg" class="lslide"> 
                 <img src="img/cS-1.jpg" />
             </li>
             <li data-thumb="img/thumb/cS-2.jpg" class="lslide"> 
                 <img src="img/cS-2.jpg" />
             </li>
             <li data-thumb="img/thumb/cS-3.jpg" class="lslide"> 
                 <img src="img/cS-3.jpg" />
             </li>
             <li data-thumb="img/thumb/cS-4.jpg" class="lslide"> 
                 <img src="img/cS-4.jpg" />
             </li>
         </ul>
     </div>
 </div>`
RonaldPK commented 8 years ago

You have selector: '#imageGallery .lslide' , but your list's ID is image-gallery. Also, you don't need to add class="lslide"; the lightSlider will do that. So this is not an issue.

yongwc2710 commented 8 years ago

Hi guys, I'm still facing the problem. can any one pleas provide a sample code ? Please find my code as below. Thanks

'<!DOCTYPE html>

lightSlider Demo
```
``` '
Tiththa commented 5 years ago

@yongwc2710 still found an answer?