In your $ (document) .ready function, wait for "afteropen" in the popup and then move the popup. Also note the “tolerance”. I set it to “0,0,0,0”, which will allow you to fill the entire screen on the iPhone 4 without any border around your popup - if your popup should fill the whole screen:
$(document).ready(function()
{
$("#popup_modal").popup({
positionTo: "window", history: false, tolerance: "0,0,0,0"});
$("#popup_modal").popup({
afteropen: function (event, ui)
{
$('#popup_modal').popup('reposition', 'positionTo: window');
}
});
$("popup_modal").popup('open');
});
source
share