How to close Ajax page display in fancybox manually?
问题 I am displaying an ajax feedback form in fancy box and i need to close the fancy box once feedback send(with time delay of 20sec). My fancy box call is... $("#feedback").fancybox({ 'speedIn' : 600, 'speedOut' : 200, 'centerOnScroll': false, 'autoDimensions': true, 'type' : 'ajax' }); 回答1: Something like this. Modify as needed. $.post('/YourAjaxRequest', { your ajax data }, function() { $.fancybox.close(); }, 'json'); This will close the dialog box when the request is finished, no matter how