Created
September 1, 2013 01:32
-
-
Save drinkmaker/6401776 to your computer and use it in GitHub Desktop.
Проверка подключения jQuery и динамическое его подключение при необходимости.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var jQ = false;function initJQ(){if(typeof(jQuery)=='undefined'){if(!jQ){jQ = true;document.write('<scr'+'ipt type="text/javascript"src="//ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js"></scr'+'ipt>');}setTimeout('initJQ()',50);}else{(function($){$(function(){ | |
console.log("this is jq"); | |
});})(jQuery);}}initJQ(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment