[jQuery] Re: Thanks for bringing back eq() in 1.2.1

2007-09-17 Thread Stephan Beal
On Sep 17, 9:36 am, Bernd Matzner [EMAIL PROTECTED] wrote: It really makes things easier when selecting elements with variables. Amen! Is there any chance of getting gt/lt() back in? My main arguments are: a) the same as above: working with variables is easier than when using selectors. b)

[jQuery] Re: Thanks for bringing back eq() in 1.2.1

2007-09-17 Thread David Duymelinck
I have to agree with Stephan about the slice method, it's not intuitive. But why do you want to use eq/lt/gt as methods if you have them as selectors? Can you give an example where a method can do more than a selector? -- David Stephan Beal schreef: On Sep 17, 9:36 am, Bernd Matzner

[jQuery] Re: Thanks for bringing back eq() in 1.2.1

2007-09-17 Thread Stephan Beal
On Sep 17, 10:23 am, David Duymelinck [EMAIL PROTECTED] wrote: But why do you want to use eq/lt/gt as methods if you have them as selectors? Can you give an example where a method can do more than a selector? You can do more with a selector in SOME contexts, and only after converting your

[jQuery] Re: Thanks for bringing back eq() in 1.2.1

2007-09-17 Thread David Duymelinck
The reason why i asked has more to do with removing same selector/method functionality out of the jQuery core than advocating for selectors. I see no reason to keep parallel functionality in the core. As for your example couldn't you do something like var c = a+b; $(...:lt(c)); Using a

[jQuery] Re: Thanks for bringing back eq() in 1.2.1

2007-09-17 Thread Stephan Beal
On Sep 17, 12:46 pm, David Duymelinck [EMAIL PROTECTED] wrote: As for your example couldn't you do something like var c = a+b; $(...:lt(c)); Using a method you would have to do that so you save some bytes. Absolutely, but it's still inelegant, IMO. i find $(...).lt(a+b) to be clearer.

[jQuery] Re: Thanks for bringing back eq() in 1.2.1

2007-09-17 Thread Sam Collett
On Sep 17, 1:06 pm, Stephan Beal [EMAIL PROTECTED] wrote: i think the main reason lt/gt were removed was because you can do the same thing with slice(). John Resig said in a post a week or so ago that they were also removed because they did only one thing, and didn't do it terribly well (or