Skip to content

Instantly share code, notes, and snippets.

@alechko
Created March 25, 2015 14:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save alechko/d371fb319923708a961d to your computer and use it in GitHub Desktop.
Save alechko/d371fb319923708a961d to your computer and use it in GitHub Desktop.
jQ noconflict
if (typeof jQuery != 'undefined') {
console.log(jQuery.fn.jquery);
} else {
var jq = document.createElement('script'); jq.type = 'text/javascript';
jq.src = 'https://ajax.googleapis.com/ajax/libs/jquery/1.2.3/jquery.min.js';
document.getElementsByTagName('head')[0].appendChild(jq);
var j = jQuery.noConflict(true);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment