Language: JavaScript
Code Snippet to Dynamically Load jQuery into a browser
/* Script to add jQuery into current page via Firebug/Console */ (function() { var b = "jQuery script is now available."; try { var a = document.createElement("script"); a.setAttribute("type", "text/javascript"); a.setAttribute("src", "http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"); document.getElementsByTagName("head")[0].appendChild(a); window['$j']=jQuery; setTimeout(function(){ if(window['jQuery']){window['jQuery'].noConflict(); alert('jQuery added.');} }, 100); }catch(c) { b = "jQuery script is NOT available yet." }return b })();
Tags:
Description:
This code snippet will help to load jQuery onto current page.
Report Abuse
Subscribe
Discuss
What's new
What is it
New Snippet
Recent Snippets
My Snippets
Web Code
Search

