In my jQuery am displaying my results in a table formatted output, a part of my jQuery is
-
Try with this JSFiddle
DEMO : http://jsfiddle.net/2yEtK/3/
Jquery Code:
$("a.removeRecord").live("click",function(event){
event.stopPropagation();
if(confirm("Do you want to delete?")) {
this.click;
alert("Ok");
}
else
{
alert("Cancel");
}
event.preventDefault();
});
讨论(0)
-
You need to add confirm() to your deleteItem();
function deleteItem() {
if (confirm("Are you sure?")) {
// your deletion code
}
return false;
}
讨论(0)
-
Update JQuery for version 1.9.1 link for deletion is here $("#div1").find('button').click(function(){...}
讨论(0)
- 热议问题