I need to pull the width of images, which I can only do after the window load event.
Of course, this doesn’t fire in jQuery Mobile, so I need an equivalent.
I have:
$(window).load(function(){
var diff = $('div.canvas img.photo').get(1).width;
console.log(diff);
});
which obviously works fine when not loaded through AJAX, but I have cycled though the various events Jquery Mobile provides, and I can’t get it to return the correct value.
$(document).live('pageshow', function(){
var diff = $('div.canvas img.photo').get(1).width;
console.log(diff);
});
Essentially it needs to return the width of an image on a newly loaded page.
pageLoad Event.
http://jquerymobile.com/demos/1.0.1/docs/api/events.html
Will need to wire it up though