jQuery dialog box not closing till a function is executed -
i'm using jquery dialog box alert user deleting record in table. following code: $('#deletebutton').click(function () { if($(this).attr('disabled')=='disabled'){ //do nothing } else{ var isdeleteyes = false; $('#delete-confirm').dialog({ height : 150, width : 400, autoopen : true, close: function( event, ui ) { //alert(closed) }, buttons : { "yes" : function () { isdeleteyes = true; $(this).dialog("close"); deletefunction(); }, "no" : function () { isdeleteyes=false; $(this).dialog("close"); ...