The popup plugin has the following custom events:
opened
$( ".selector" ).popup({ opened: function(event, ui) { ... } });
This event is triggered when the popup has completely appeared on the screen, meaning that all associated animations have completed.
closed
$( ".selector" ).popup({ closed: function(event, ui) { ... } });
This event is triggered when the popup has completely disappeared from the screen, meaning that all associated animations have completed.