[jQuery] Re: .find() works in 1.1.2 but not 1.0.4?

2007-04-13 Thread m3avrck
John, that worked wonders! Didn't realize you could wrap a jQuery object in another :-D Yy!!! Will be announcing this plugin tonight :-D ted On Apr 13, 12:00 pm, "John Resig" <[EMAIL PROTECTED]> wrote: > Probably the easiest way to duplicate what you're trying to do, in > both versions o

[jQuery] Re: .find() works in 1.1.2 but not 1.0.4?

2007-04-13 Thread Brian Cherne
I stumbled upon this jQuery speed test from someone else's web site. It's testing against v1.0.4 and v1.1.2 (I think)... I understand wanting to write a backwards compatible plug-in, but in an ideal world folks should try to use the more recent version (for speed an

[jQuery] Re: .find() works in 1.1.2 but not 1.0.4?

2007-04-13 Thread John Resig
Probably the easiest way to duplicate what you're trying to do, in both versions of jQuery, is to wrap the jQuery object in another: y = $(year).find('option:eq(1)').val(); that should protect it. --John On 4/13/07, m3avrck <[EMAIL PROTECTED]> wrote: Ah yes, I'm trying to make this work in

[jQuery] Re: .find() works in 1.1.2 but not 1.0.4?

2007-04-13 Thread m3avrck
Ah yes, I'm trying to make this work in 1.0 and 1.1 ;-) ted On Apr 13, 11:39 am, Karl Swedberg <[EMAIL PROTECTED]> wrote: > On Apr 13, 2007, at 9:44 AM, m3avrck wrote: > > > Ahhh, ok I didn't realize .find() is destructive now :-) > > Sorry I'm not answering the question, but I wanted to clarify

[jQuery] Re: .find() works in 1.1.2 but not 1.0.4?

2007-04-13 Thread Karl Swedberg
On Apr 13, 2007, at 9:44 AM, m3avrck wrote: Ahhh, ok I didn't realize .find() is destructive now :-) Sorry I'm not answering the question, but I wanted to clarify that .find() isn't destructive now. It was only destructive pre-1.1. Cheers, --Karl _ Karl Swedberg www.english

[jQuery] Re: .find() works in 1.1.2 but not 1.0.4?

2007-04-13 Thread m3avrck
Ahhh, ok I didn't realize .find() is destructive now :-) But even with that, I can't get it to work still: y = year; y = y.find('option:eq(1)').val(); If I try and copy the var to a new one, it doesn't work. However, if I just say y = 2007 then it works great, or if I use 1.1.2, it works

[jQuery] Re: .find() works in 1.1.2 but not 1.0.4?

2007-04-12 Thread John Resig
You have to remember that .find() in < 1.1 is destructive, so anything you do a .find() you're changing the state of 'year', even if you're not assigning back to it. (This was changed for obvious reasons.) Additionally, to get the first item you can just do :first, which is easier, it seems. --