Better solution:
1 |
<script>!window.jQuery && document.write(unescape('%3Cscript src="js/minified/jquery-1.9.1.min.js"%3E%3C/script%3E'))</script> |
1 2 3 4 5 6 7 8 9 10 11 12 |
if (!window.jQuery || typeof(jQuery) === 'undefined') { var jq = document.createElement('script'); jq.type = 'text/javascript'; // Path to jquery.js file, eg. Google hosted version jq.src = '//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js'; document.getElementsByTagName('head')[0].appendChild(jq); } window.onload = function(){ $(document).ready(function(){ }); } |