/ Published in: jQuery
Expand |
Embed | Plain Text
$('.delete').click(function (){ var answer = confirm("Are you sure?"); if (answer) { return true; }else{ return false; } });
Comments
Subscribe to comments
You need to login to post a comment.

this will pop up a confirm anytime you add a "delete" class to a button, div, or anything else. jQuery then returns true or false, making the form cancel or submit. Best if used on the submit button on the page.