Hacker News new | ask | show | jobs
by krishanath 2864 days ago
jQuery is a library of shortcuts. Everything you can do using jQuery you can do without jQuery, but that's like saying everything you can do in Excel you can do with just a Calculator app. Yes, it is possible, but why would you want to?

When you do things like drag & drop and interactive resize you have to query DOM to get position and sizes, and perform hit detection, and you have to manipulate DOM directly. jQuery is very convenient for these kinds of things.

2 comments

I maintain a number of widgets with jQuery for an edtech app with drag and drop, works on mobile and desktop, etc.

I'm starting to rewrite those to Vue and I've found the main limitation is not the DOM access (since you can use refs) but the model logic. In Vue all data is made of primitives or dumb objects, you can't really use classes for reactive data.

I know exactly what jQuery is. I’ve used it happily for years on many projects. However it is completely obsolete in 2018 for anyone that does not need to support IE8.
I may be mistaken, but sounds like you are referring to browser compatibility not being a good reason to adopt jQuery anymore.

But like the parent said above, there's more to jQuery than just getting browser compatibility - it's an abstraction for UI concepts that would require writing a ton of low level JS otherwise.