<script type="text/javascript">
if (typeof jQuery == 'undefined') {
var script = document.createElement('script');
script.type = "text/javascript";
script.src = "http://ajax.googleapis.com/ajax/libs/jquery/1.5.2/jquery.min.js";
document.getElementsByTagName('head')[0].appendChild(script);
}
</script>
Here is my current code. Is there any way to load a local copy of the jquery lib, if script.src = "http://ajax.googleapis.com/ajax/libs/jquery/1.5.2/jquery.min.js"
fails? And is this script loaded asynchronous? Or will it freeze the ui thread until loaded?