Inject jQuery into a Webpage Through Chrome Javascript Console

include these lines of jQuery instantiation code in the javascript console

Exploring the DOM is much easier with jQuery. However, You may be working with a webpage that does not natively have jQuery installed.

That’s ok, the following lines of code will solve this. Just include these lines of jQuery instantiation code before you explore the DOM and now you can use jQuery!

var jq = document.createElement('script');
//paste the following code into console in Chrome or Firebug in Firefox.
jq.src = "http://code.jquery.com/jquery-latest.min.js";
document.getElementsByTagName('head')[0].appendChild(jq);
jQuery.noConflict();

Leave a Reply

Your email address will not be published.