My favorite part of the release notes: "Despite jQuery.isNaN() being undocumented, several projects on Github were using it. We have contacted them and asked that they use jQuery.isNumeric() or some other solution."
This is an excellent reminder of how much things have changed in the last 10 years in our space; a popular tools vendor can go query a massive source code repository and reach out proactively for transitioning deprecated functions.
Kudos to the jQuery team for the great attitude; and of course all hail github, but they know I feel that way since they charge my card every month. :)
There is one ambiguous case: If the data argument is a string, you must provide either a selector string or null so that the data isn’t mistaken as a selector. Pass an object for data and you’ll never have to worry about special cases.
I'm being picky I know, but wouldn't it just be easier to use something like:
The data feature isn't used that frequently, and when it is the best way to use it is by passing an object anyway. So although it's mentioned it is likely to be very uncommon.
Can someone describe to me how these jQuery releases make their way into Rails 3.1 land? Does the maintainer of https://github.com/rails/jquery-rails do an update and then it's up to us Rails users to execute a "bundle update"?
Yes, most likely. And hopefully the version number is incremented semantically so `bundle update` doesn't break anyone that really needs 1.6.
If you haven't tried rails-behaviors[1], I recommend it. It's a modular, drop-in replacement for jquery_ujs, and I think @josh will update it shortly for 1.7
The quickest way to drop it in vendor/assets. Anything there will override any gems. so `//= require jquery` will just find your local copy instead. Shouldn't have to change any requires.
It looks like jQuery versions get updated occasionally in that repo, but you'll have to check and see when 1.7 gets put in.
My recommendation would be to maintain dependency versions yourself, i.e. download the version of jQuery you want to use and //= require jquery in application.js - then grab a new version of jQuery whenever you want it updated
Correct. You could also manually download the latest jQuery and include it.
The gem is a very thin wrapper around jQuery, jQuery UI and jquery_ujs, which basically makes the files available for inclusion in your manifests, and adds a jQuery specific helper method for your tests.
Why isn't there a tool that analyzes which functions / features of jQuery your project is using and generates a smaller library with only the stuff you need?
I'm not really a developer so ignore if that's not possible / makes no sense.
I've been leaning more and more toward Zepto for mobile. It's still lacking a fair bit of jQuery's functionality, but the basics are there and the syntax is compatible. You lose a lot of IE/older browser support, but if you do some device sniffing and serve jQuery to desktops and Zepto to mobile devices, that's not really an issue.
Is there a good set of jQuery tutorials that uses 1.7 (so you don't learn non-best practices)? I know it was just released, but these things are often built along with the development.
The docs site has a "What's new in jQuery 1.7" section that might help. As far as what is non-best practice, we'll be covering some of that in a blog post next week so stay tuned.
I'm really excited about being able to load jQuery as an AMD module. This means you can load jQuery with RequireJS and write nice, modular code. I highly recommend anyone doing large-scale web projects to use Require, it changed the way how i write Javascript.
It's always nice with new features and enhancements but some bugs should first be fixed, like e.g. this one (i cannot update my code to a version higher than 1.5.x due to customers still using IE7):
http://bugs.jquery.com/ticket/9646
We closed a huge number of bugs in 1.7, but yes there are about 100 open bugs plus another roughly 100 more that are either feature requests or unverified. For a project the size of jQuery and considering the installed base, I think that is pretty good.
And the way these bugs get fixed is by someone spending a lot of time to track them down. As the 1.7 blog post mentions, we definitely welcome any help we can get. We are all volunteers so we don't have the time to quickly track down and fix every bug.
In the triage process we put priority on fixing the worst bugs that affect the most people. I personally triaged both #9646 and #8205 so we could mark them as verified, but tracking down and solving older-IE problems can be torture given the crude stone debugging tools available in those environments. If you have a high threshold for pain, we could certainly use your help.
[+] [-] vessenes|14 years ago|reply
This is an excellent reminder of how much things have changed in the last 10 years in our space; a popular tools vendor can go query a massive source code repository and reach out proactively for transitioning deprecated functions.
Kudos to the jQuery team for the great attitude; and of course all hail github, but they know I feel that way since they charge my card every month. :)
[+] [-] luriel|14 years ago|reply
[+] [-] untog|14 years ago|reply
I'm being picky I know, but wouldn't it just be easier to use something like:
Perhaps it's far too verbose, now that I've typed it out. But it just seems like it would do a good job of removing ambiguities like this.[+] [-] dmethvin|14 years ago|reply
[+] [-] drewda|14 years ago|reply
[+] [-] nixme|14 years ago|reply
If you haven't tried rails-behaviors[1], I recommend it. It's a modular, drop-in replacement for jquery_ujs, and I think @josh will update it shortly for 1.7
[1] https://github.com/josh/rails-behaviors
[+] [-] joshpeek|14 years ago|reply
curl http://code.jquery.com/jquery-1.7.js > vendor/assets/javascripts/jquery.js
[+] [-] ByteMuse|14 years ago|reply
My recommendation would be to maintain dependency versions yourself, i.e. download the version of jQuery you want to use and //= require jquery in application.js - then grab a new version of jQuery whenever you want it updated
[+] [-] nfm|14 years ago|reply
The gem is a very thin wrapper around jQuery, jQuery UI and jquery_ujs, which basically makes the files available for inclusion in your manifests, and adds a jQuery specific helper method for your tests.
[+] [-] bad_user|14 years ago|reply
[+] [-] dmethvin|14 years ago|reply
[+] [-] alastair|14 years ago|reply
I'm not really a developer so ignore if that's not possible / makes no sense.
[+] [-] kellishaver|14 years ago|reply
[+] [-] Werba|14 years ago|reply
Why eq: 1.css 14kb -250ms engine.js 12kb 250ms
jquery 33kb 320ms ???
so
jquery1.js 13kb - 243ms jquery2.js 14kb - 250ms
So my page open 100ms faster :P
[+] [-] jonknee|14 years ago|reply
[+] [-] kenjackson|14 years ago|reply
[+] [-] dmethvin|14 years ago|reply
[+] [-] kvnn|14 years ago|reply
Get to coding ;)
[+] [-] huskyr|14 years ago|reply
[+] [-] suyash|14 years ago|reply
[+] [-] clarkmoody|14 years ago|reply
[+] [-] brunnsbe|14 years ago|reply
[+] [-] dmethvin|14 years ago|reply
And the way these bugs get fixed is by someone spending a lot of time to track them down. As the 1.7 blog post mentions, we definitely welcome any help we can get. We are all volunteers so we don't have the time to quickly track down and fix every bug.
In the triage process we put priority on fixing the worst bugs that affect the most people. I personally triaged both #9646 and #8205 so we could mark them as verified, but tracking down and solving older-IE problems can be torture given the crude stone debugging tools available in those environments. If you have a high threshold for pain, we could certainly use your help.
[+] [-] raleec|14 years ago|reply
I had to work around this insidious creation http://bugs.jquery.com/ticket/8205
It creates a memory leak (it hit my getJSON calls) that slowly strangled one of my apps until it crashed the browser.
I list a lot of hours on that one...
[+] [-] weixiyen|14 years ago|reply
[+] [-] dmethvin|14 years ago|reply
http://addyosmani.com/blog/jquery-1-7s-callbacks-feature-dem...
[+] [-] ghc|14 years ago|reply
This new release fixes the issue and I can confirm the fix works like a charm.
[+] [-] HeroNote|14 years ago|reply
http://www.heronote.com/files/jQuery.htm
[+] [-] scarmig|14 years ago|reply
They've also improved event delegation performance by a factor of 2.
[+] [-] vailripper|14 years ago|reply