codecomputerlove/PhotoSwipe — Issue #280: PhotoSwipe does not load correctly with jQuery Mobile
Author: skibohemen
Created: 2012-02-26 14:10:04+00:00
State: open

I am using JQM 1.0.1 and PhotoSwipe 3.0.4, and the setup is

$("#bilder").live("pageinit", function() {
console.log("Instantiating PhotoSwipe ...");
var myPhotoSwipe = $("#img_gallery a").photoSwipe({ enableMouseWheel: false , enableKeyboard: false });
})

The #bilder div is a JQM page (data-role="page") and the #img_gallery div is the content div inside that page. It contains a ul-list with a couple of images linked the same way as in your example on www.photoswipe.com. The images just show up according to the static markup, no enhancement by PhotoSwipe. No errors encountered either, and the pageinit event is properly triggered according to the console log.

I notice that the examples in the distribution have a slightly more complex setup than the examples on www.photoswipe.com, is this an issue in my case?