Intercepting a jQuery.ajax() call with confirm() Intercepting a jQuery.ajax() call with confirm() jquery jquery

Intercepting a jQuery.ajax() call with confirm()


$('.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...            }        });    }});