Lots of us are still using it for one reason or another. How about you? What's your story?
Lots of us are still using it for one reason or another. How about you? What's your story?
For further actions, you may consider blocking this person and/or reporting abuse
Qyrus -
Keshav Khatri -
waelhabbal -
Marcos Mendes -
Latest comments (98)
I don't see any valid reason to not use jQuery.
The point of jQuery is not ajax or cross-browsing. The point of jQuery is simplicity and concise readable code. Every method in jQuery returns a jQuery object therefore the method chaining is possible. You cannot write such a code in pure JavaScript.
Also, jQuery has 30,000 (according to Github) plugins. Some of them are super popular. For example, Select2 alone used in almost 3% of all websites. It 10 times more than Angular. Can you write such a thing in pure JavaScript? I am sure you can, but it will take you weeks if not months.
Size (27kb gzipped) can matter for about 0.00001% of projects. If it really matters don't use it but don't use React as well otherwise it doesn't make any sense.
SPA (React, Angular, Vue) are not suitable for projects that require indexing by search engines. Old style multiple page jQuery featured website is a better choice for such projects.
But jQuery with very little extra work can be used for creating SPA as well. I have written a very small (150 lines of code) SPA framework that makes routing and organizes code into logical modules, and use it for creating mobile and progressive web apps.
Actually, I don't see any reason to use any of the modern JS frameworks. They are too big, too complex, they mix html, css, js, they use impossible to debug bindings, and so on and so on.
I would just add that MediaWiki, which is used by probably the biggest website on Internet the Wikipedia, use jQuery as main JS frameowork. And I don't think it will change. I don't see any reason why you would like to rewrite to something new just because it's invented. jQuery works just fine and it's easy to learn and use.
Hot takes incoming!
A ton of sites I've worked on don't really need a larger framework, but I keep noticing that it's dangerously easy to convince myself that I need React, Vue or something similar.
If you're building Spotify, you need a framework. I get that because it's truly an app. But take Facebook or Twitter. Those feel like websites that don't need a framework. That being said, I use Twitter every day, so I'm not complaining or criticizing.
Now that my hot takes are over, I keep some rules in mind when I build a site with jQuery. Some of these I learned from using StimulusJS, which ironically enough is another framework!
data-*
attributes for thisI originally used it to solve browser compatibility, and it also helped make the language easier to read (for me!).
Fast forward 10 years, the C# MVC project I was working on is heavily split between backend (API) and frontend (Javascript). Sticking to what I know, there is heavy use of jQuery (also to replace a commercial control library). Eventually I realise this is beyond what it was made for and I'm re-inventing wheels or looking for plugins to help.
These days I get to use Angular, which has it's faults, but I refuse to drop back to the comfortable arms of jQuery, because I'm not having the problems it was originally solving for me.
I have trememndous respect for jQuery, but my coding style and needs have moved on.
You shouldn't define yourself with a technology or a library or a framework. Actually, jQuery helped developers in a lot of projects.
These are great plugins for jQuery;
jQuery DataTable, FullCalendar, Carousel, tooltipsy, etc.
It still using by WordPress so we can't say it's legacy.
So, is it cool now to hate jQuery? I think I need to follow this cool-driven development
Also, I just wanna add, from the coding perspective, I don't find jQuery nearly as annoying as still seeing floats & clearfixes for layout in 2019 π€¦ββοΈ
πββοΈ Here!
Reason? Just inheriting and maintaining old projects.
When people see some set of new tools, they always forget the good part of the former, and will be blindfolded on the bad part of the later.
As for me, even though I'll ditch jQuery for vue on big projects, jQuery is still ok for some reasons.
I'm still using JQuery in WordPress theme and simple static site.
I do. I think JS frameworks are the main source of modern bloat and still make my sites fairly hand-crafted. And modern stuff that isn't React/Vue/Angular still use it. I feel calling it "medieval" is very inaccurate.
I sure do, when I'm not building a 'SPA' ... in fact it's a very well designed library, simple and it just works - when you maintain a little bit of discipline in order to not make it a mess, that is.
A drawback that I don't hear mentioned often is its bundle size - it's surprisingly big considering what it does (I saw that for the next release they're planning to make it smaller). Also it's not really using ES6 as far as I know. And TBH most of what jQuery does can quite easily be done with the native DOM api (and 'fetch' for AJAX).
For my current Laravel project I am considering to replace it with StimulusJS (of Rails fame). However to then completely phase out jQuery I'd also need a solution for Bootstrap which currently has a dependency on jQuery (for Bootstrap 5 they're planning to remove jQuery as a dependency).
But, to make a long story short, yes I've used it on a bunch of projects and am not ashamed to admit it :-)
I remember reading jQuery documentation in 2015 while learning Java Swing and thought 'I'll take this whole web app thing when they've agreed on a syntax'. . . years later that's now the medieval period.
Don't forget to ask who is still using vanilla js π
I do not!!! Huahaha
But some of my coworkers are still clinging to him. A couple have followed my example and have begun to leave it gradually. It is a total success!
Some comments may only be visible to logged-in visitors. Sign in to view all comments.