I have function like
function someFunc(somevar) {
somevar = typeof(somevar) != 'undefined' ? somevar : 1;
$.ajax({
url: 'index.php',
type: 'post',
data: 'somevar=' + somevar,
dataType: 'json',
success: function(json) {
// smth
}
}
});
}
I want to get $.ajax funciton as object, so I can edit it. Any suggestions are welcomed
$.ajax()or edit your own copy of the JS file. Once it's loaded, you can't edit the loaded copy. You could replace it with your own version if you wanted (not sure why though).