I made a picture content were the user can press the "load more" and more pictures and zoom to the pictures. The pictures that i display are okay and the user can zoom just fine without any problems but when the user presses the button "load more" to view more pictures then the zoom function does not work for these pictures. Any suggestions on how to fix that problem?
<img style=" max-width: 170px; max-height: 220px;" src="img/<?php echo $rows['picture']; ?> "data-zoom-image="img/<?php echo $rows['picture']; ?> " alt="">
// script that enables zooming in pictures
<script>
$('.zoomContainer').remove(); $("[data-zoom-image]").elevateZoom({scrollZoom : true});
</script>
//button that loads 4 more pictures with javascript
<a class="btn2 loading-more">
<i class="icon_loading"></i>
Load More
</a>
<script>
$(".col").slice(0, 8).show()
$(".btn2").on("click", function(){
$(".col:hidden").slice(0, 4).slideDown()
if ($(".col:hidden").length == 0) {
$(".btn2").fadeOut('slow')
}
})
</script>