jQuery mobile popup on pageinit
问题 I want a popup to open as soon as the page loads but seem to be getting stuck with the spinning wheel. Here is a fiddler to demonstrate the problem any help would be appreciated. http://jsfiddle.net/Ohpyx/UGfXG/ The code I'm using is: $(document).live('pageinit',function(event){ $('#popupBasic').popup('open'); }) 回答1: This worked for me: $(document).on('pageinit', '.ui-page',function(event){ setTimeout(function () { $('#popupBasic').popup('open'); }, 0);//Note the comment below from @Taifun.