Jquery code is

```
$(".confirmDialog").live("click", function (e) {

// e.preventDefault(); use this or return false
var url = $(this).attr('href');

$("#dialog-confirm").dialog({
    autoOpen: false,
    resizable: false,
    height: 170,
    width: 350,
    show: { effect: 'drop', direction: "up" },
    modal: true,
    draggable: true,
    buttons: {
        "OK": function () {
            $(this).dialog("close");
            window.location = url;

        },
        "Cancel": function () {
            $(this).dialog("close");

        }
    }
});
$("#dialog-confirm").dialog('open');
return false;

```

});

HTML.cshtml code is

```
<div id="dialog-confirm" style="display: none">
<p>
    <span class="ui-icon ui-icon-alert" style="float: left; margin: 0 7px 20px 0;"></span>
    Are you sure to delete ?
</p>

```

button is

when I using button it is deleting data

```
                    @Html.ActionLink("Delete", "Delete", new { id = item.Sid }, new { @class = "confirmDialog" })

```

But not showing popup. and 
How to delete and show popup when using image.