jquwey dialog box does not close
===

Here is my jquery for dialog

    </script>
            <script type="text/javascript">
    
                $.ajaxSetup({ cache: false });
    
                $(document).ready(function () {
                    $(".openDialog").live("click", function (e) {
                        e.preventDefault();
    
                        $("<div></div>")
                        .addClass("dialog")
                        .attr("id", $(this)
                        .attr("data-dialog-id"))
                        .appendTo("body")
                        .dialog({
                            title: $(this).attr("data-dialog-title"),
                            minWidth: 200,
                            minHeight: 100,
                            resizable: false,
                           close: function () { $(this).remove() },
                            modal: true
    //                        buttons:{ 
    //                            close:function(e){
    //                               e.preventdefault();
    //                               $(this).closest(".dialog").dialog("close"); 
    //                            }}
                            
                       })
                                                       
    
                        .load(this.href);
                    });
    
                    $(".close").live("click", function (e) {
                        e.preventDefault();                  
                        $(this).closest(".dialog").dialog("close");
                    });
    
                    $(".refresh").live("click", function (e) {
                        e.preventDefault();
                        location.reload();
                    });
                });          
        </script>
and here is my delete view

    @using (Html.BeginForm()) {
        <div>
        <p>Are you sure you want to delete?</p>
           @Html.HiddenFor(model=>model.UId)
       <table border=0>
        <tr>
       <td>Name:</td>
        <td>@Html.DisplayFor(model =>model.FName)
        @Html.DisplayFor(model => model.LName)</td>
        </tr>
        <tr>
        <td>PAddress:</td>
        <td>@Html.DisplayFor(model => model.PAddress)</td>                                        
    
        </tr>
        </table>
         <input type="submit" value="Yes"/>
        <button  class="close">No</button>
       

     </div>
    }

the problem is when I call the close class from the button the dialog does not close.but when I remove preventDefault the dialog closed. any help please why the dialog box is not closing.

