Reputation: 172
I have multiple PhotoSwipe galleries from a list for a portfolio which work perfectly on a Desktop, but only the 1st Gallery shows its images on mobile devices, and the subsequent galleries do not. The PhotoSwipe instance instantiates and I can navigate using the arrows etc, but no images.. any ideas? (I have tried using rel="external" to no avail)
The photoswipe code:
function startSwipe(btnId)
{
var galleryName = btnId;
(function(window, PhotoSwipe)
{
var
options = {
preventHide: false,
loop: false,
captionAndToolbarShowEmptyCaptions: false,
getImageSource: function(obj){
return obj.url;
},
getImageCaption: function(obj){
return obj.caption;
}
},
instance = PhotoSwipe.attach(
[
{ url: 'http://www.example.com/gallery/'+galleryName+'/images/0.jpg'},
{ url: 'http://www.example.com/gallery/'+galleryName+'/images/1.jpg'},
{ url: 'http://www.example.com/gallery/'+galleryName+'/images/2.jpg'},
],
options
);
instance.show(0);
}(window, window.Code.PhotoSwipe));
}
and the jqm:
<div data-role="content">
<ul data-role="listview" data-theme="a" class="centerLiPort">
<li id="gal1" onClick="startSwipe(this.id)">
<div class="imgDiv"><img src="images/gal1.jpg" ></img></div>
<a>Gallery 1</a>
</li>
<li id="gal2" onClick="startSwipe(this.id)">
<div class="imgDiv"><img src="images/gal2.jpg" ></img></div>
<a>Gallery 2</a>
</li>
<li id="gal3" onClick="startSwipe(this.id)">
<div class="imgDiv" ><img src="images/gal3.jpg" ></img></div>
<a>Gallery 3</a>
</li>
</ul>
</div><!--/content-->
Upvotes: 0
Views: 1321
Reputation: 172
Well I couldn't solve this, the only work around I found was to duplicate the image galleries into the subdomain directories which really stinks, but it works. The error lies somehow in how IOS handles image linking - as it works perfectly fine on a desktop and other mobile devices.
Upvotes: 1