Hacker News new | past | comments | ask | show | jobs | submit login
You might not need jQuery (youmightnotneedjquery.com)
12 points by KolmogorovComp 12 days ago | hide | past | favorite | 6 comments





I didn't know about Element.before, Element.replaceWith and Node.contains… despite them being around for quite some time! Would have saved me from writing some clunkier code than necessary.

We may need a "You might not need React" website now.


Most of the examples need at least 5x the code compared to jQuery. You will inevitably end up encapsulating those in your own functions at which point why not just use jQuery for this type of DOM manipulation?

>jQuery and its cousins are great, and by all means use them if it makes it easier to develop your application.

>If you're developing a library on the other hand, please take a moment to consider if you actually need jQuery as a dependency. Maybe you can include a few lines of utility code, and forgo the requirement. If you're only targeting more modern browsers, you might not need anything more than what the browser ships with.


jQuery is needlessly bloated. I have no use for it but if I really wanted sth like jq I would pick Cash or Zepto.

The minified jQuery script at 70KB is smaller than most images on an average website.

Jquery stopped being cool about nine years ago



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: