Short answer: Yes
And of course, jquery means additional overhead, which is not always acceptable.
@lynxlynxlynx By overhead, do you mean computer resources? Is JQuery more resource demanding?
I’ve been forcing myself to use vanilla JS in my projects and haven’t found a need for jquery yet. Here’s a resource I found useful: https://github.com/oneuijs/You-Dont-Need-jQuery
@ksc23 Thanks. I’ll give this a read.
@Nicknyr Interesting. Didn’t realize JQuery was such a resource hog.
There are a lot of JQuery detractors. It’s become cool to come down on it.
Like many decisions in programming, there is a tradeoff to be made. JQuery is (arguably) easier to read and cleaner. But that comes at a price of bandwidth and speed.
Does it matter? Sometimes it will be hugely important, and sometimes it will be inconsequential.
As others have mentioned, it is important to learn both. JQuery is used on more than 70% of all websites, so you must learn it. But there will be times when you will need (because of needs of the app or prejudices of other programmers) you may need to not use it. So it’s good to eventually learn to do those things without JQ. But at this point, you don’t really need to learn that - it will come quickly later on.
Some people get worried about jQuery’s “BIG” download size… which is 84K .min.js
but see no problems using Angular2 that has a 566K min.js size.
On the other end of the spectrum Vue.js 2 is only 58.8K.
I’m a big fan of Vue… also easier to use/understand than Angular.
Also JS + Vue + jQuery can work together just fine (just be aware of what not to do so as to not screw up model binding).