Live data from Hacker News

JQuery 1.7 Released

blog.jquery.com

11–20 of 47 posts

Re: JQuery 1.7 Released

#11
post #6

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"?

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

Re: JQuery 1.7 Released

#13
post #6

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"?

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.

Re: JQuery 1.7 Released

#14
post #6

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

[1] https://github.com/josh/rails-behaviors

Re: JQuery 1.7 Released

#15
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. :)

Re: JQuery 1.7 Released

#16
post #6

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"?

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

I submitted a pull request with the update to 1.7, so hopefully it'll get released officially soon.

Re: JQuery 1.7 Released

#17

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.

There is nothing I see in the release notes that indicate you would develop non-best practices by using something like 1.6.

Get to coding ;)

Re: JQuery 1.7 Released

#18
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.

Re: JQuery 1.7 Released

#19
post #7
post #3

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: $("#div").on("click", { selector: "span", data: "blahblah", handler: function() }); Perhaps it's far too v…

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.

I use event data a lot, but I didn’t even realise you could pass a string.
Post reply on HN