I have code as below for some Div. I need to call the ajaxSuccess in a different place manually. How do I call it? Alternatively is to pull everything within ajaxSuccess to a separate function so it can be called at multiple spot but I prefer to call directly to that #someDiv’s ajaxSuccess. Is there a way?
$('#someDiv').click(function() {
//Do something
}).ajaxSuccess(function(event, request, settings) {
//Do success
}).ajaxError(function(e, xhr, settings, exception) {
//Do failure
});
1 Answer