[jQuery] Re: 1.2/1.1 slice() vs lt(): what is preferred way to handle both of these cases?

2007-09-11 Thread Josh Bush
You could add lt in at the top of your plugin if it's missing. Something like: if(!jQuery.fn.lt){ jQuery.fn.lt=function(n){ return this.slice(0,n); } } Josh On Sep 11, 3:32 pm, Stephan Beal [EMAIL PROTECTED] wrote: Hi, all! i'm going through my plugins and making sure they work

[jQuery] Re: 1.2/1.1 slice() vs lt(): what is preferred way to handle both of these cases?

2007-09-11 Thread Stephan Beal
On Sep 11, 10:38 pm, Josh Bush [EMAIL PROTECTED] wrote: You could add lt in at the top of your plugin if it's missing. Something like: if(!jQuery.fn.lt){ jQuery.fn.lt=function(n){ return this.slice(0,n); } } i don't feel right about adjusting the global jQuery API for the

[jQuery] Re: 1.2/1.1 slice() vs lt(): what is preferred way to handle both of these cases?

2007-09-11 Thread Klaus Hartl
Stephan Beal wrote: Hi, all! i'm going through my plugins and making sure they work in 1.1.{3,4} and 1.2, and i've come across an ugly case... i use lt(), which isn't available in 1.2. Of course, lt() can be replaced by slice(), but that isn't in 1.1.x. My plugin would work in both versions

[jQuery] Re: 1.2/1.1 slice() vs lt(): what is preferred way to handle both of these cases?

2007-09-11 Thread John Resig
.slice() is in 1.1.4 - we added it in that release, intentionally, so that users of the 1.1.x branch would have something to upgrade to, to get that functionality, before transitioning to 1.2. --jOHn On 9/11/07, Stephan Beal [EMAIL PROTECTED] wrote: Hi, all! i'm going through my plugins and