JQuery backup alternative

Using the line of code below, like most websites, I wonder if it is possible to have an alternative to backup? For example, if googleapis.com ~ is not used, use this script src instead?

 <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js" type="text/javascript"></script> 

Thanks in advance,

Anders

+6
javascript jquery html
source share
1 answer

Try something like this:

 <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.3/jquery.min.js"></script> <script>if(typeof jQuery=="undefined"){document.write(unescape("%3Cscript src='/Scripts/jquery-1.4.3.min.js' type='text/javascript'%3E%3C/script%3E"));}</script> 
+7
source share

All Articles