Live data from Hacker News

jQuery 3.6.0

blog.jquery.com

21–30 of 292 posts

Re: jQuery 3.6.0

#22
post #6

Do people still use jQuery? I thought the biggest advantage of this library back in the day was css selector access of DOM nodes (back when we only had getElementById, getElementsByClassName, and getElementsByTagName). This has been rolled into the Javascript document api via document.querySelector, and document.querySelectorAll. Also there are browser compatibility issues that jQuery solved but a lot of these are so…

I think a lot! For example, the new https://www.whitehouse.gov uses jQuery.

When you just want to add a small bit of interaction to a mostly-static site, jQuery can help.

There's a current trend to complicate things with a JAM stack that really don't need to be complicated.

I've seen people propose something like

    [NodeJS/Ruby/PHP backend] 
      -> GraphQL API 
      -> React Frontend 
      -> static html
Where really they could have just gone with

    [NodeJS/Ruby/PHP backend] 
      -> static html

Re: jQuery 3.6.0

#23
post #6

Do people still use jQuery? I thought the biggest advantage of this library back in the day was css selector access of DOM nodes (back when we only had getElementById, getElementsByClassName, and getElementsByTagName). This has been rolled into the Javascript document api via document.querySelector, and document.querySelectorAll. Also there are browser compatibility issues that jQuery solved but a lot of these are so…

For me personally, it's partly familiarity and also still compatibility. I know that if I use jQuery, then (for the parts it covers) I don't have to search caniuse.com.

But then, I'm not a front-end web developer, so I optimize for different type of projects.

Re: jQuery 3.6.0

#24
post #14

jQuery taught me how to write JavaScript frameworks. John Resig, the founder of jQuery, wrote a book called "Secrets of the JavaScript Ninja" was back then really a mindbender. Function.prototype.toString() is really the craziest thing I know to date regarding JS. Heavily used in earlier versions of jQuery according to the book.

Please elaborate about toString() ?

If called on a Function it returns the source of the function, which allows for all sorts of meta programming.

Re: jQuery 3.6.0

#25
post #6

Do people still use jQuery? I thought the biggest advantage of this library back in the day was css selector access of DOM nodes (back when we only had getElementById, getElementsByClassName, and getElementsByTagName). This has been rolled into the Javascript document api via document.querySelector, and document.querySelectorAll. Also there are browser compatibility issues that jQuery solved but a lot of these are so…

I use it primarily because it provides an easy interface for ancestor, descendant utilities. But I'm also not doing this in a FT setting, just for side projects.

Re: jQuery 3.6.0

#26
post #6

Do people still use jQuery? I thought the biggest advantage of this library back in the day was css selector access of DOM nodes (back when we only had getElementById, getElementsByClassName, and getElementsByTagName). This has been rolled into the Javascript document api via document.querySelector, and document.querySelectorAll. Also there are browser compatibility issues that jQuery solved but a lot of these are so…

Every single WordPress blog ships it by default.

I would not start a greenfield project based on it today, sure, but it is used by a truly staggering amount of sites today, so having it get updates in the form of security fixes and some additional functionality benefits a large part of the web.

Re: jQuery 3.6.0

#27
post #6

Do people still use jQuery? I thought the biggest advantage of this library back in the day was css selector access of DOM nodes (back when we only had getElementById, getElementsByClassName, and getElementsByTagName). This has been rolled into the Javascript document api via document.querySelector, and document.querySelectorAll. Also there are browser compatibility issues that jQuery solved but a lot of these are so…

> This has been rolled into the Javascript document api via document.querySelector, and document.querySelectorAll.

Have you actually compared the two methods in a real website? It's like saying why use Ruby when you can use Java. The Javascript document API is super verbose. No thanks.

Re: jQuery 3.6.0

#28
post #6

Do people still use jQuery? I thought the biggest advantage of this library back in the day was css selector access of DOM nodes (back when we only had getElementById, getElementsByClassName, and getElementsByTagName). This has been rolled into the Javascript document api via document.querySelector, and document.querySelectorAll. Also there are browser compatibility issues that jQuery solved but a lot of these are so…

I never understood why people say “We’ve solved your jQuery problem” by introducing getElementsByClassName() or even querySelector(). When I come back to my older app, $(“.my-class”) is still much nicer. jQuery gets out of the way, the class gets syntax-highlighted, and .focus() can’t create an NPE.

Re: jQuery 3.6.0

#29
post #22
post #6

Do people still use jQuery? I thought the biggest advantage of this library back in the day was css selector access of DOM nodes (back when we only had getElementById, getElementsByClassName, and getElementsByTagName). This has been rolled into the Javascript document api via document.querySelector, and document.querySelectorAll. Also there are browser compatibility issues that jQuery solved but a lot of these are so…

I think a lot! For example, the new https://www.whitehouse.gov uses jQuery. When you just want to add a small bit of interaction to a mostly-static site, jQuery can help. There's a current trend to complicate things with a JAM stack that really don't need to be complicated. I've seen people propose something like [NodeJS/Ruby/PHP backend] -> GraphQL API -> React Frontend -> static html Where really they could have ju…

To be fair the first case is only static for the initial load then becomes a single page application

Re: jQuery 3.6.0

#30
post #6

Do people still use jQuery? I thought the biggest advantage of this library back in the day was css selector access of DOM nodes (back when we only had getElementById, getElementsByClassName, and getElementsByTagName). This has been rolled into the Javascript document api via document.querySelector, and document.querySelectorAll. Also there are browser compatibility issues that jQuery solved but a lot of these are so…

It is still bundled in WordPress and WP is still most popular CMS (30% sites on the web runs on it)

It is not necessary to use jQuery when you build site but tons of tutorials on the web is using it so people does.

Plus wp-admin still loads jQuery for itself so it is in use even unnoticed.

Post reply on HN