// Assign handlers immediately after making the request,
// and remember the jqXHR object for this request
var jqxhr = $.ajax( "example.php" )
.done(function() {
alert( "success" );
})
.fail(function() {
alert( "error" );
})
.MyCustom(function() {
alert( "Item Already Exists In the List" );
})
.always(function() {
alert( "complete" );
});
}