public
Last active — forked from cdevroe/jQuery Confirm delete?

  • Download Gist
jQuery Confirm delete?.js
JavaScript
1 2 3 4 5 6 7 8 9 10
$(document).ready(function(){
// All links with class delete
$('.delete').click(function(event){
// This should work--if cancel is pressed, it returns false, canceling
// the click. I haven't tested it out myself, though.
return confirm("Are you sure you want to delete this item?");
});
});

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.