4 ms·
jQuery was popular because of the cross-browser functionality it offered, since having to read about all the different quirks was a huge time sink. Also being a
by swang 11y ago
jQuery was popular because of the cross-browser functionality it offered, since having to read about all the different quirks was a huge time sink. Also being able to use a selector $() to grab DOM nodes was _huge_. So easy and convenient.
I think once web apps starting getting larger and larger, jQuery became more and more of a hinderance (since it offered no framework for structuring apps).
- kedean 11y agojQuery was popular because it was easily grokked by people who were more designers than developers. It had lots of competition early on, my favorite being MooTools, many of which were far better designed and had equal cross-browser support. jQuery was simply more accessible to people without a solid programming backgroud. Had the world gone with one of the many other options back in the day, I think we might be in a better place already.
- mattmanser 11y agoI don't see what this adds apart from sour grapes. It would help if you told us what insight we missed about MooTools that would have made the world a better place? Why jQuery has made it such a miserable one?
- kedean 11y agoI'm not trying to be sour, sorry, I'm just pointing out that jQuery didn't win due to some special superiority that it has. It is in no way better than any of the competition that it had in the early days. jQuery works, of course, but it didn't do anything special in terms of functionality or capabilities. It had everything to do with the audience it appealed to early on.
- level3 11y agojQuery's understandability is part of its superiority over MooTools. When I was first looking for a Javascript library years ago, it was better documented than other libraries, it was more readable (particularly method names), and didn't lean towards OOP (I admit I personally hated Java). MooTools and other libraries might possibly be more powerful if you are developing in Javascript in general, but for web development I primarily care about DOM manipulation, and it was much easier to pick up jQuery than anything else at the time. It's a mistake to think that languages should win out simply based on functionality and capabilities, without taking into account things like ease of use and learning curve.
- DCoder 11y agoOne thing worth noting: MooTools, Prototype.js and some other libraries were fond of extending built-in object prototypes. jQuery wasn't. ES7 wanted to introduce an Array#contains method. But due to prototype extension issues like https://esdiscuss.org/topic/having-a-non-enumerable-array-prototype-contains-may-not-be-web-compatible https://esdiscuss.org/topic/having-a-non-enumerable-array-pr... , they had to rename it to Array#includes ...