Generic Google Map Example with Markers
JavaScript
function loadExtScript(src, test, callback) {
var s = document.createElement('script');
s.src = src;
document.body.appendChild(s);
var callbackTimer = setInterval(function () {
var call = false;
try {
call = test.call();
} catch (e) {}
if (call) {
clearInterval(callbackTimer);
callback.call();
}
}, 100);
}
//load jQuery check if it loaded and perform an append
loadExtScript('https://code.jquery.com/jquery-2.1.4.js', function () {
return (typeof jQuery == 'function');
}, jQueryLoaded);
function jQueryLoaded() {
alert("Jquery loaded and I will perform some tasks!")
jQuery("body").append("<span>Jquery loaded</span>");
}