I'm currently working on an Instagram iframe that fetches 9 random images with href links for pictures and spans with the same background. My goal is to display these images in a popup gallery. I've tried using Bootstrap for the popup, but I'm encountering an issue where only the first or last picture opens in the popup.
<a data-toggle="modal" data-target="#myModal1" href="'.$thumbnail.'" class="image"><span style="background-image:url('.$thumbnail.');"> </span></a>
<div id="myModal1" class="modal fade" role="dialog" style="overflow-y: hidden;">
<div class="modal-dialog">
<a href="" class=""><div id="pic" class="modal-content" style="background-image:url('.$thumbnail.'); ></div></a>'
</div>
</div>
Any suggestions or solutions would be greatly appreciated!