Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What version of jQuery should I actually use? [closed]

So a few months ago, there was a time I didn't actually need jQuery for anything, and almost forgot it.

Then I woke up. So, I headed to http://jquery.com/download/ just to get extremely confused about what actually happened.

The last thing I remember is using version 1.8.3, and the page tells me that

The jQuery 1.x line had major changes as of jQuery 1.9.0. We strongly recommend that you also use the jQuery Migrate plugin if you are upgrading from pre-1.9 versions of jQuery or need to use plugins that haven't yet been updated.

Okay? The jQuery 1.x line? Well, what line was 1.9.0 then?

The 2.x notes are relatively simple to understand, if you don't need support for IE8 and under, go for it. But really, what is 1.11.0?

  • Does it support older versions of IE? 8 to be accurate.
  • Do I need to use the migration plugin if I use an old plugin?
  • What am I missing?

As I have no idea of which version I should use, I'll just stick with the 1.8.3 until I know what I should use.


2 Answers

From the jQuery blog post on the releases of 1.9.0 and 2.0:

  • jQuery 1.9 and 2.0 have the same API. Several deprecated features such as $.browser have been removed from both versions. It’s all laid out in the jQuery 1.9 upgrade guide.
  • jQuery 1.9 runs on Internet Explorer 6, 7, and 8 (“oldIE”), just like previous versions. Consider it a cleaner, slimmer, modern-API upgrade from jQuery 1.8.
  • jQuery 2.0 will not run on oldIE. As a result of removing several layers of barnacle-encrusted code, it will be both faster and smaller than jQuery 1.9.

So to answer your questions

  1. 1.11.0 still supports IE 6, 7 and 8, the difference of >= 1.9.0 is in the api
  2. Migrate plugin can be used to detect if your code is using deprecated or removed features, maybe using it to detect whether your old plugin is using such features would be recommendable
  3. You were missing the blog post that explained these changes
like image 126
jakee Avatar answered Sep 15 '25 03:09

jakee


If you're starting to use jQuery (you weren't using it in your project), and you need support for IE8 an earlier, use the latest version, 1.11. This version belongs to the 1.x line, as the number indicates. The only difference between 1.x and 2.x is IE support.

like image 40
Oscar Paz Avatar answered Sep 15 '25 02:09

Oscar Paz