bgrins / devtools-snippets

A collection of helpful snippets to use inside of browser devtools
http://bgrins.github.io/devtools-snippets/
2.96k stars 370 forks source link

Load a specific version of jQuery #36

Closed yawboakye closed 4 years ago

yawboakye commented 11 years ago

Sometimes you need a specific version of jQuery. Here you go! This snippet adds

It appends only one script tag to the body no matter how many times it is called. Most of the time it doesn't manipulate the DOM if the version you want to load is the version already available.

bgrins commented 11 years ago

I'm wondering if this should be merged in with part of the jqueryify snippet: https://github.com/bgrins/devtools-snippets/tree/master/snippets/jquerify. Any thoughts?

yawboakye commented 11 years ago

I see the relationship. Reason I put it in the same folder. Sure, I could work on merging them. How do you want it?

bgrins commented 11 years ago

The way the build script works right now, it will either need to replace the current jquerify.js or be its own folder. I guess the main difference to jqueryify.js is that you just run it once and you instantly have jquery on your page. This has more power, but requires more steps. So after all, I'm thinking this should be its own snippet, with its own folder and README (called jquery-version or similar as you did with the file).

yawboakye commented 11 years ago

How about we merge both so that running the snippet has the value of running jquerify.js, that is, have jQuery v2.0.3 inserted into the page as well as set up loadjQuery, resetjQuery, and JQUERY_VERSIONS?