Open sebamsg opened 7 years ago
Hi guys, im trying to make and endless scroll but i cant lightbox the new images that loads the endless scroll. Im using fancybox to open the images.
my HTML code is:
> <div id="mygallery" class="justified-gallery "> > <a href="..dist/img/reg (53).jpg" rel="ligthbox" class="jg-entry entry-visible fancybox "> > <img alt="" src="dist/img/reg (53)a.jpg" /> > </a> > <a href="http://mdbootstravp.com/images/reg/reg (54).jpg" rel="ligthbox" class="fancybox"> > <img alt="" src="dist/img/reg (53)b.jpg" /> > </a>
and script that loads is:
> <script> $(window).scroll(function() { > if($(window).scrollTop() + $(window).height() == $(document).height()) { > for (var i = 0; i < 2; i++) { > $("#mygallery").append('<a href="http://mdbootstrap.com/images/reg/reg (51).jpg" rel="ligthbox" class="fancybox">' + '<img alt="" src="dist/img/reg (53)g.jpg" />' + '</a>'); > } > $("#mygallery").justifiedGallery("norewind"); > } > }); > </script>
Thanks in advanced!! Seba.
Hi guys, im trying to make and endless scroll but i cant lightbox the new images that loads the endless scroll. Im using fancybox to open the images.
my HTML code is:
and script that loads is:
Thanks in advanced!! Seba.