I want to disable onclick function, in order to stop calling same function when an ajax on it is in progress.
onclick function :
function fnDisplaySubjects(url,cat,divid)
{
/* DISABLE ONCLICK HERE */
$.ajax({
url: url+"/cat/"+cat,
type: "POST",
complete: function(){
/* ENABLE ONCLICK HERE */
},
success: function(response){
$('#'+divid).html(response);
}
});
}
}
Appreciate your help..
Try: