I am currently working on an image gallery that utilizes the Paver jQuery plugin. The gallery is functional, but I am facing an issue where it displays the same image in the modal instead of showing the respective data-image for each image.
My goal is to dynamically update the source attribute in the modal window based on the data-image specified in the anchor tag.
You can view a sample of the issue here
<a class="panos" href="#" data-image-id="" data-toggle="modal" data-title="This is my title" data-caption="Some lovely red flowers" data-image="http://placehold.it/1600x450" data-target="#pano-modal">
<img class="img-responsive" src="http://placehold.it/1600x450" alt="Short alt text" width="200">
</a>
<a class="panos" href="#" data-image-id="" data-toggle="modal" data-title="This is my title" data-caption="Some lovely red flowers" data-image="http://placehold.it/1400x450" data-target="#pano-modal">
<img class="img-responsive" src="http://placehold.it/1400x450" alt="Short alt text" width="200">
</a>
<div class="modal fade" id="pano-modal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-body">
<div class="panorama" data-paver data-start-position="0"><img id="image-gallery-image" src=""></div>
</div>
</div>
</div>
</div>
/* Styles and Media Queries */
@media (min-width: 768px) {
.modal-dialog {
max-width: 700px;
margin: 30px auto;
}
}
.modal-body {
position: relative;
padding: 0px;
}
/* Other CSS rules... */
If you encounter the issue mentioned above, both images in the gallery display the same image rather than showing the individual 1600 and 1400-sized images. Your assistance in resolving this would be highly appreciated.