Live data from Hacker News

jQuery 3.0 Release Candidate

blog.jquery.com

21–30 of 71 posts

Re: jQuery 3.0 Release Candidate

#21
post #9
post #2

Major Changes: .load, .unload, and .error, deprecated since jQuery 1.8, are no more. Use .on() to register listeners. jQuery.Deferred is now Promises/A+ compatible Error cases don’t silently fail Animations now use requestAnimationFrame Massive speedups for some jQuery custom selectors

Is anyone using custom selectors? quick googling only returns 5+ years old results

I use :visible. The notes say it can increase speed 17x in certain cases.

Re: jQuery 3.0 Release Candidate

#23

I'm finding I don't need jQuery anymore. What are the reasons people still use it?

jQuery also tends to handle a lot of assorted browser quirks, giving you a consistent api to call.

Yeah, initially they was one of its biggest selling points.

Re: jQuery 3.0 Release Candidate

#24

I'm finding I don't need jQuery anymore. What are the reasons people still use it?

For quick mock up / temporary pages sometimes regular JS is quite verbose, and a full framework or whatever like react/mithril/angular/ember/whatever is too much extra hassle. When writing 20 lines + 2 plugins in jQuery is enough to make a 'static site' feel much more interactive / responsive (UI, not screensize) then sometimes it works great.

It's a bit like the perl of web page JS for me. I wouldn't recommend writing a full complex application in it - although that is possible and by people who know what they're doing can be done cleanly and organised... but for super quick hackery, it's hard to beat.

Re: jQuery 3.0 Release Candidate

#26
post #20

Since I used d3.js for one project a few years ago, I have not touched jQuery ever since. d3 offers key jQuery features, but goes much more beyond that.

I've often head this and it would probably be in my next-side project. Do you have an AJAX API bundled with D3 or are you using some custom functions ?

you can use whatwg-fetch instead of jquery ajax

Re: jQuery 3.0 Release Candidate

#27

I'm finding I don't need jQuery anymore. What are the reasons people still use it?

jQuery also tends to handle a lot of assorted browser quirks, giving you a consistent api to call.

In addition to handling well-known browser inconsistencies, it also covers obscure edge cases such as these: https://docs.google.com/document/d/1LPaPA30bLUB_publLIMF0Rlh...

Re: jQuery 3.0 Release Candidate

#28
post #20

Since I used d3.js for one project a few years ago, I have not touched jQuery ever since. d3 offers key jQuery features, but goes much more beyond that.

I've often head this and it would probably be in my next-side project. Do you have an AJAX API bundled with D3 or are you using some custom functions ?

d3.json, d3.csv, d3.xhr etc

You can check the documentations here:

https://github.com/d3/d3/wiki/Requests

Those methods are quite powerful.

Re: jQuery 3.0 Release Candidate

#29

Since I used d3.js for one project a few years ago, I have not touched jQuery ever since. d3 offers key jQuery features, but goes much more beyond that.

What do you typically use it for?

It basically replaces jQuery, so there's that.

And it's the default choice for any complex web data visualization project.

Re: jQuery 3.0 Release Candidate

#30
Exciting news for jQuery.

Last night, I was working on a side project. For the front-end, I'm using React, React-Route, and I'm working on figuring out Fluxible. superagent to wrap XmlHttpRequest. browserify to compile what I serve to the front-end. I don't run a reverse-proxy with a node backend since the API is in PHP, I just served the minified JS files.

Honestly, it's a huge pain. And every module I toss in there seems to limit compatibility with the next one. The barrier of entry to doing things right is HUGE. Also, if you disable JS the site would be useless, 100%.

If I were to go with angular it would be even worse. I honestly may go back to jQuery on this project yet. I don't expect it to be huge, and since most Foundation plugins use jQuery anyway it should work. I honestly loathe how much crap I'm loading for two pages: sign-up / register.

Post reply on HN