javascript - Magnific-Popup Gallery with two image tag in a single a tag -
i'm making gallery magnific-popup speed website i've inside tag 2 different image. 1 big screen , 1 small screen. i'm hidding 1 or other 1 image bootstrap class (hidden-lg hidden-md & hidden-sm hidden-xs).
the problem when click on tag open image gallery, magnific-popup try open hidden image , return "the image not loaded".
<li> <figure> <div class="gallery-item"> <a href="assets/upload/images/romantic/clem-onojeghuo-193397.jpg" title="" class="gallery-item"> <img src="/assets/image-cache/romantic/clem-onojeghuo-193397.5ddf5942.jpg" alt="" class="hidden-lg hidden-md"> <img src="/assets/image-cache/romantic/clem-onojeghuo-193397.36620614.jpg" alt="" class="hidden-sm hidden-xs"> <div class="gallery-caption"> <div class="centrize"> <div class="v-center"><i class="hc-search"></i></div> </div> </div> </a> </div> </figure> </li>
$('.gallery-item').magnificpopup({ type: 'image', gallery:{ enabled:true } });
it own error because i've 2 time "gallery-item" class. 1 on div tag , other on tag.
Comments
Post a Comment