Live data from Hacker News

jQuery 3.0 Released

jquery.com

11–20 of 164 posts

Re: jQuery 3.0 Released

#11
post #8

Is anybody in the HN crowd still using jQuery for new projects? If yes, why not use "vanilla" js?

So far every new project in the last few years ended up using jQuery because there is always this one ui widget that does what we need and the other libraries just aren't there yet and its not worth the hassle of reimplementing or extending a different library just to not use jQuery.

True. Although whenever I see a jQuery plugin like that I try to replace it with some combination of "components" [1]. There is a lot of progress in that area.

There are stuff like : File picker [2], dropdown [3], tip [4] for tooltips and many more.

1 : https://github.com/component

2 : https://github.com/component/file-picker

3 : https://github.com/component/dropdown

4 : http://component.github.io/tip/

Re: jQuery 3.0 Released

#12

Is anybody in the HN crowd still using jQuery for new projects? If yes, why not use "vanilla" js?

Yes of course, for new projects now and for the foreseeable. Its terse expressive fluent syntax alone is reason enough to use it for me. Nothing else comes close for ad-hoc dom work, and your user almost certainly has it cached already anyway.

Re: jQuery 3.0 Released

#13

Is anybody in the HN crowd still using jQuery for new projects? If yes, why not use "vanilla" js?

Yup. No shame here in using it.

It helps me get the job done quickly for projects when I don't need/want a framework.

It is well documented, organized, and lively ecosystem of devs, documentation, support options, and -- yes -- plugins.

It is a consistent and easy to understand API, and the breaking changes are well understood between versions.

Re: jQuery 3.0 Released

#16

Is anybody in the HN crowd still using jQuery for new projects? If yes, why not use "vanilla" js?

XML. For HTML jQuery is rarely worth the dependency any more for me, but trying to consistently parse and manipulate XML with vanilla JS across browsers feels like working with HTML did five years ago.

I know XML is not cool any more, but sometimes you don't have a choice.

Re: jQuery 3.0 Released

#17
post #14

Earlier quoted context omitted.

Is that comparison supposed to show that jQuery is bad or what exactly? Because it's clear that jQuery is much more concise in every single case.

The reason the site exists is explained on the site itself.

[deleted]

Re: jQuery 3.0 Released

#18

Is anybody in the HN crowd still using jQuery for new projects? If yes, why not use "vanilla" js?

I started using "vanilla" js, then created a method as a name for the huge `[].prototype.slice.call(document.querySelectorAll(selector))`

Then as I continued adding useful methods such as ajax() (no, in vanilla js it's not "solved") and turning events off (also non-trivial) I ended up with a jquery alternative:

> http://umbrellajs.com/

It's not exactly the same, but most methods are the same or highly compatible. For example, the append() method is extended so this does what you'd expect it to do, generate a list with first, second and third items:

u('').append(text => `${text}`, ['first', 'second', 'third']);

Re: jQuery 3.0 Released

#20

Is anybody in the HN crowd still using jQuery for new projects? If yes, why not use "vanilla" js?

Had this very conversation today - I still like jQuery as previously it was extremely useful for projects (circa 2011).

I haven't really used it in the last 4 years as most of my projects have had frameworks in place.

I definitely think it still has it's place - it is more concise and reads a lot nicer in many cases than vanilla JS for DOM manipulation and AJAX requests.

Post reply on HN