I'm using a Fancybox iframe where when the user confirms a question I want to update the contents of the original page after success in an ajax:
$.ajax({
type: 'POST',
url: 'excluir_foto2.asp',
data: {cod: cod},
success: function () {
parent.$("#Itemwookmark" + '<%=id_wookmark%>').fadeOut(1000, function () {
parent.$("#Itemwookmark" + '<%=id_wookmark%>').remove();
parent.wookmark.initItems();
parent.wookmark.layout(true);
parent.$.fancybox.getInstance().close();
});
}
});
But currently, to work, I had to put in to remove the item inside Wookmark, update Wookmark and only then call the .close () method to close the fancybox.
Is there any way I can close fancybox first and then remove the Wookmark item?