$('.removeItem').click(function (event) { if (confirm('Are you sure you want to delete this?')) { $.ajax({ url: 'myUrl', type: "POST", data: { // data stuff here }, success: function () { // does some stuff here... } }); }});