Thanks John! Looks like I'll use that to create my own objFilter method :).
On Jan 22, 7:48 pm, John Resig <jere...@gmail.com> wrote: > Previously certain selectors worked on non-nodes. This is both > unexpected and unsupported (and absolutely not guaranteed to work > cross browser - especially with the new querySelectorAll stuff > landing). Removing this "feature" was definitely a bug fix. > > So, what are the alternatives? Right now your best bet is probably: > > $(someObject).filter(function(){ return this.name === "value"; }) > > Just use a function and a custom expression to do any filtering. I > hope this helps! > > --John > > On Thu, Jan 22, 2009 at 7:12 PM, Ryura <yoyobo...@gmail.com> wrote: > > > Ello, > > > In 1.2.6 I can do > > > var data = {}; > > data.x = { > > a: [], > > b: [] > > } > > > data.x.a.push({ > > name: "foo", > > num: 0 > > }); > > > data.x.a.push({ > > name: "foo2", > > num: 0 > > }); > > > $(data.x.a).filter('[name="foo"]') > > > And I get the expected object { > > name: "foo", > > num: 0 > > } > > > However, in 1.3 I now get an empty jQuery object (length=0). Has this > > (undocumented) functionality been removed due to Sizzle? Are there any > > plans to bring it back in a future release? I *need* to use this for a > > large project I've been working on, but we want to upgrade to 1.3 > > for .live() and Sizzle's enhancements. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "jQuery Development" group. To post to this group, send email to jquery-dev@googlegroups.com To unsubscribe from this group, send email to jquery-dev+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/jquery-dev?hl=en -~----------~----~----~----~------~----~------~--~---