Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Are there any good reasons NOT to use jQuery instead of plain old JavaScript? [closed]

I recently discovered jQuery, and I can immediately see how useful and elegant it is.

I'm curious, though - are there any reasons NOT to use it (and just use plain old JavaScript instead)? If there aren't any reasons, should it not be integrated fully into the JavaScript language?

like image 921
Tola Odejayi Avatar asked Nov 30 '09 21:11

Tola Odejayi


People also ask

Why jQuery is not recommended?

Back to the topic at hand on Why You shouldn't use JQuery in a framework? Because it'll just make your app heavy. Everything JQuery can do, VanillaJS/JS/TypeScript can do better and faster. It results to a terribly large amount of JavaScript code written.

Why we use JavaScript instead of jQuery?

Pure JavaScript can be faster for DOM selection/manipulation than jQuery as JavaScript is directly processed by the browser. jQuery has to be converted into JavaScript to make it run in a browser. All these can be done in JavaScript but we may have to write many lines of code.

Is jQuery still relevant in 2021?

6 Reasons Why We Still Use jQuery in 2021. jQuery has been around for over 10 years, which is a long time for a code library. It's still one of the most popular JavaScript libraries in web development. We love jQuery here at Atypic and still utilize it in our projects.


1 Answers

If you don't actually use any of the features of jQuery, there's no reason to introduce the page weight to your site. If you do use any of the features, there's probably not a good reason to roll your own version except for learning purposes.

like image 185
Hank Gay Avatar answered Oct 17 '22 05:10

Hank Gay