Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Clearly posting this in 2022 is really funny, it is almost 10 year old I guess? Technically it's still interesting for improving one code style but does jQuery still heavy in use nowadays? I mean people use it, but I suppose more by choice than by default, they have to really WANT to use it.


Confession: I use it constantly. The thought of having to look up how to do absolutely everything makes me wince.

I am -genuinely- open to suggestions on how to get over that I just can’t currently justify making everything harder “for a short while” when that short while feels like it could be weeks or months to catch up to fluency.


Instead of elems = $(selector, context), use elems = […context.querySelectorAll(selector)]

Instead of $.get(), use await fetch()

Instead of .on(eventtype, handler), use elem.addEventListener(eventtype, handler)

Instead of .animate(), use CSS animations


jQuery is still nice to use, I do it sometimes these days.




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

Search: