In jQuery Mobile 1.2.0 i'm using the new popup widget.
$('#my_popup').popup('close');
$('#my_popup').popup('open');
I obviously want to wait until the the popup closes completely before i open it again. The close method does not provide a callback function option.
You can use the popupafterclose event, below is the snippet on how to do it.
For more information you can look at the jQuery-Mobile Docs
$( "#my_popup" ).bind({
popupafterclose: function(event, ui) { ... }
});
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With