Live data from Hacker News

JQuery 1.7 Released

blog.jquery.com

1–10 of 47 posts

Re: JQuery 1.7 Released

#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 verbose, now that I've typed it out. But it just seems like it would do a good job of removing ambiguities like this.

Re: JQuery 1.7 Released

#5
This makes me so happy. Those of us developing on Chrome 16 have been suffering through a storm of event.layerX/Y deprecation warnings.

This new release fixes the issue and I can confirm the fix works like a charm.

Re: JQuery 1.7 Released

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

Re: JQuery 1.7 Released

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

Re: JQuery 1.7 Released

#10

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.
Post reply on HN