I have a question regarding .ajaxComplete().
Lets say I do this:
// Register an ajaxComplete (pseudo code ish)
$('#someId').ajaxComplete(function () {
if (ajaxCompleted == isAjaxImWaitingForToComplete) {
// something something
}
});
Then this will be called every time an ajax task finishes. Is there a way to make it only be called once, then unregister?
Could I add $(‘#someId’).unbind(); at the bottom of the function inside the ajaxComplete?
The
.ajaxComplete()function binds a handler for theajaxCompleteAJAX event, so calling.unbind('ajaxComplete');should work.