The popup can be closed as follows:
$( ".selector" ).popup( "close" );
But in your case, you should use it as follows:
setTimeout(function(){ $( ".selector" ).popup( "close" ); },1);
setTimeout is necessary because the web kit browser cannot close the popup without a slight delay.
Working example: http://jsfiddle.net/Gajotres/B6TgZ/
$(document).on('pagebeforeshow', '#index', function(){ $(document).on('click', '#feedback_send', function(){ setTimeout(function(){ $( "#popupDialog" ).popup( "close" ); },1); }); });
Before closing the popup, do everything you need to do. There is also another approach, you can always close your popup and call popupafterclose to complete all that needs to be done.
$( "#popupDialog" ).on( "popupafterclose", function( event, ui ) {
Of course, this solution still requires a button to launch the pop-up closure function. But unlike solution 1, this will not lead to a small delay (delay = action, which you will do before the pop-up window is closed) until the pop-up window closes.
source share