JQuery 1.5.1 released, includes full IE 9 support
blog.jquery.com
blog.jquery.com
So thanks John Resig and the rest of the jQuery dev team for making us web dev guys more productive and actually making JavaScript fun.
Fiddling with cross-browser support is something that my brain don't like to keep today, be it js or css. Things like jQuery for js and compass for css come in handy to brush over that. :)
Can't speak to the performance relative to JQuery or to raw javascript however.
Just compare the work a browser has to do for something like:
document.getElementById("foo").setAttribute("bar", "baz");
to the work needed for the jquery equivalent...Now the good thing is that most consumers of jquery don't care about performance of their code (in that they're doing small enough amounts of stuff it doesn't matter much).
> Now the good thing is that most consumers of jquery don't
> care about performance of their code
Many do, but more do care about cross-browser compatibility and when you need to support IE6,7 home-rolled code is not likely to cut all the research and effort that's embedded in jQuery. $('#foo').attr('bar', 'baz');
your code is30 times faster in Chrome 9
81 times faster in Firefox 3.6
None the less, I take offense to the part of jquery-ui that is hijacking the web browser UI. It is remapping keys and pointer usage (text selection). This should have never been allowed in the W3C and EMACscript (javascript) standards. Hijacking the browser UI of a disabled person is like kicking the crutches out from under someone just to see them fall and because you think it will make you look cool to others.
Web developers never know how a user-agent is configured and never know the needs of the person using the web browser. Changing how the UI normally works really does hurt, confuse and infuriate many people, and probably more than just the disabled folks.
Sure, disabled people are a very small part of the population, and they typically are not the rich consumers buying the latest and greatest. They may not be your target market, your real customer concern, but excluding them with browser hijacking is unnecessary, and in some ways unfair.
At least please think over...
ARIA is very cool stuff - definitely recommend that you check it out! http://www.w3.org/TR/wai-aria/
This technical part is the most relevant as a public comment/link in HN, in my opinion.
[1] Obviously there are situations when it simply isn't possible to create fully accessible solutions. Sometimes our hands are tied by management, tech stack requirements, etc.
The thing to realize is I was REALLY trying to contain my temper when the hyperbole slipped out. It's tough be positive while share a perspective of frustration few developers ever see.
Also some places like Apple have their own internal js frameworks and want folks who know and can code bare-metal js.
For desktop browsers, use the Google CDN and your users probably won't download a thing. And for free, you get sane DOM interaction, and an enormous body of work papering over the differences between browsers.
And Google is one step closer to tracking everything everyone does on every website.
As if now forcing people to deploy Google Analytics on their websites if they want keyword data from Google wasn't enough, do we really want to help and encourage Google to get in a position where they effectively control the entire internet?
One company controls over 90% of internet search and referral and they actually have the power to kill any company they don't like. Right now they may be behaving, but what if some competitor comes along which is showing some edge? Can we trust Google to do the right thing?
Google also hosts files needed by a majority of websites. They also withhold information from you about you and your site and force you to register an account with them and deploy their software on your sites to get access to a subset of that information. And you are encouraging people to help that company get a stronger grip. For what benefit? At what cost? Sorry for not being a fanboy, but try looking at the bigger picture here.
Would you be OK with one company controlling the entire Internet if that company was Apple? If it was Microsoft?
Hosting your own 23kb jQuery file does not cost that much. Actually practically nothing. Not in terms of bandwidth and neither in terms of perceived performance. Unless you are hosting your website on a 36.6kbps modem, host your own. Do the web some good.
As long as you link the right files (make sure you specify the specific version and not use the one to give the lastest), there are very long expires headers and Google will have no idea the vast majority of your users ever visited. A user just needs to visit one site using the same version of Google hosted jQuery and they won't have to download it again when visiting another site.
> Hosting your own 23kb jQuery file does not cost that much. Actually practically nothing. Not in terms of bandwidth and neither in terms of perceived performance. Unless you are hosting your website on a 36.6kbps modem, host your own. Do the web some good.
People aren't using Google CDN for the cost, but for the performance. A high percentage of user will have the file cached already, so the performance gain is quite significant. Doubly so in a mobile environment.
But like I said, I would rather use it than have to come up with a bunch of cross browser supported js on my own. The guys behind the lib are clearly JavaScript rockstars :) while I am fan. I just find the lib's api and general approach to problem solving to be a bit wonky and dont really understand "the ease of use" that everyone touts it having.
var elemt = $('#elementID')
and then you can call something like elemt.hide() or whatever.