I need the code to use regular javascript to detect whether or not JQuery is present, if not, load JQuery file from google or another website
UPDATE Two Working Solutions (just copying and pasting the working code here):
From Claudio Redi
window.jQuery || document.write("<script src='https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js'>\x3C/script>")
From Rob Darwin
var jQueryScriptOutputted = false;
function initJQuery() {
if (typeof(jQuery) == 'undefined') {
if (! jQueryScriptOutputted) {
jQueryScriptOutputted = true;
document.write("<scr" + "ipt type=\"text/javascript\" src=\"https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js\"></scr" + "ipt>");
}
setTimeout("initJQuery()", 50);
}
}
initJQuery();