Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I "upgrade" the jQuery version within the DOM?

While on-site with a client, I was proposing an upgrade of the jQuery version the client is using (ie, from jQuery 1.5 to 1.11). The client has minor concern that their version of TimeGlider won't be compatible with the newer jQuery. I'm not familiar with TimeGlider, so they browsed (wth Chrome) to a page with TimeGlider to demonstrate it to me.

I thought I'd be slick and "upgrade" the DOM's jQuery library, using developer tools, to settle the question immediately. I know one way to import the jQuery 1.11 library, but this technique would necessitate a simple way to first remove the old jQuery version. Perhaps there's a better approach.

Of course this is trivial to edit within the sourcecode, but I really wanted to do it within the DOM, via developer tools.

How can I "upgrade" the jQuery version within the DOM?

like image 308
Jeromy French Avatar asked Dec 17 '14 21:12

Jeromy French


People also ask

Which command will give a version of jQuery?

Type this command in the Chrome Developer Tools Javascript console window to see what version of the jQuery is being used on this page: console. log(jQuery().


1 Answers

  • Go to the Sources tab.
  • Find jQuery file (cmd+p / ctrl+p).
  • Add a breakpoint in the first (non-comment) line of the script.
  • Reload page.
  • When execution stops, select whole contents of the file and replace them with contents of jquery-1.11.0.min.js.
  • Save the changes (cmd+s / ctrl+s).
  • File will recompile and website will run jQuery 1.11.0.

recompiled version of jQuery

like image 149
Konrad Dzwinel Avatar answered Sep 24 '22 16:09

Konrad Dzwinel