How can I achieve this?
- A user clicks the delete link (with a class of "confirm").
- Confirmation message appears asking "Are you sure?" with "Yes" and "Cancel" options.
If yes is selected, the link continues as clicked, but if cancel is selected, the action is canceled.
Update: Final working code with confirm()
thanks to this guy:
$('.confirm').click(function() {
return confirm("Are you sure you want to delete this?");
});