Currently I concatenate my javascript into one file on build (all.js) For performance reasons and to reduce bandwidth, I am attempting to use jQuery.js from the google api.
https://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.js
After doing this, all of my Ajax functionality has ceased to work giving the error:
“Uncaught reference error: Ajax is not defined.”
Previously, jquery was the first file to be in “all.js”
I am including javascript files in this order:
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.js"></script>
<script src="/js/all.js"></script>
Any help would be much appreciated, I’ve been scratching my head at this one for hours.
Line causing problem:
jQuery.ajax({
url: queryUrl,
//cache: false,
success: function(html) {
onAjaxCallSuccess(input, queryUrl, jQuery.trim(html));
}
});
For the record, I’m using jQuery 1.4.2, jqueryUI 1.8.6 and mootools 1.4.1
The problems were caused by a conflict with mooTools. Refactored my AJAX to use jquery exclusively, now everything works great.