Live data from Hacker News

jQuery 4

blog.jquery.com

61–70 of 313 posts

Re: jQuery 4

#61
Everything I ever used jquery for 15 years ago, I found myself able to do with the CSS and the JS standard library maybe 10 years ago. I honestly am confused when I see jquery used today for anything.

Is there still anything jquery does you cannot easily do with a couple lines of stdlib?

Re: jQuery 4

#62

Earlier quoted context omitted.

Not even modern vanilla JavaScript?

It's fairly close now but so much more verbose: ie document.getElementById('theID') vs $('#theID')

Nearly every time I write something in JavaScript, the first line is const $ = (selector) => document.querySelector(selector). I do not have jQuery nostalgia as much as many others here, but that particular shorthand is very useful.

For extra flavor, const $$ = (selector) => document.querySelectorAll(selector) on top.

Re: jQuery 4

#63
post #51

Whenever HTMX comes up here, I always think "isn't that just some gobbledy-gook which replaces about 3 lines of imperative jquery?" Anyway, jQuery always did the job, use it forever if it solves your problems.

The problem with jQuery is that, being imperative, it quickly becomes complex when you need to handle more than one thing because you need to cover imperatively all cases.

[deleted]

Re: jQuery 4

#65
post #61

Everything I ever used jquery for 15 years ago, I found myself able to do with the CSS and the JS standard library maybe 10 years ago. I honestly am confused when I see jquery used today for anything. Is there still anything jquery does you cannot easily do with a couple lines of stdlib?

Jquery does many things in one line that requires a couple lines of stdlib. Writing less code is what libraries are for.

Re: jQuery 4

#66

Unbelievably, still supports IE 11 which is scheduled to be deprecated in jQuery 5.0

It looks like it was done to not delay the 4.0 release. Since they follow semvar, that means it won't get the axe until 5.0 [1]. Pretty wild considering that 3.0 was released 10 years ago.

But maybe they will scope this one better: they were talking about getting 4.0 released in 2020 back in 2019!

[1]: https://github.com/jquery/jquery/pull/5077 [2]: https://github.com/jquery/jquery/issues/4299

Re: jQuery 4

#67
post #4

Earlier quoted context omitted.

Backwards compatibility. Apparently there are still some people stuck on IE11. It's nice that jQuery still supports those users and the products that they are still running.

This is the part that I find the strangest: > We also dropped support for other very old browsers, including Edge Legacy, iOS versions earlier than the last 3, Firefox versions earlier than the last 2 (aside from Firefox ESR), and Android Browser. Safari from iOS 16, released in 2022, is more modern in every conceivable way than MSIE 11. I'd also bet there are more people stuck with iOS 16- than those who can only us…

“Support” here probably means “we’re testing jQuery for compatibility on those web browsers” - likely Safari from iOS 16 still runs this version of jQuery just fine. However, running automated test suites or support bugfixing for those clients is a lot harder than spinning up some Microsoft-provided VM with IE11 on it.

Re: jQuery 4

#68
post #4

Earlier quoted context omitted.

Backwards compatibility. Apparently there are still some people stuck on IE11. It's nice that jQuery still supports those users and the products that they are still running.

Who is still stuck on IE 11---and why?

Surely by this point someone has written a 0-day for MSIE 11 which gets root and silently installs an Internet Explorer skinned Chromium. If not, someone should get onto that. —Signed, everyone

Re: jQuery 4

#70
post #61

Everything I ever used jquery for 15 years ago, I found myself able to do with the CSS and the JS standard library maybe 10 years ago. I honestly am confused when I see jquery used today for anything. Is there still anything jquery does you cannot easily do with a couple lines of stdlib?

Jquery does many things in one line that requires a couple lines of stdlib. Writing less code is what libraries are for.

Until you have to upgrade it and it bites you
Post reply on HN