[jQuery] Re: question about slice()

2008-06-25 Thread jack
Thank you so much, Karl. By the way on jQuery Doc, it said we may use negative integer for starting from the last. But it seems didn't work. Sorry about double post. Jack

[jQuery] Re: Question about slice

2008-06-24 Thread RobG
On Jun 25, 12:27 pm, jack <[EMAIL PROTECTED]> wrote: > Just a beginner's question. I found slice(start, end) seems doesn't > pick up that the last one specified by 'end'. Such as slice(0, 3), it > picks up 0, 1 and 2. Is that correct? You might want to check the ECMAScript specification: 15.4.4.

[jQuery] Re: Question about slice

2008-06-24 Thread Ariel Flesler
Check this, works exactly the same: http://snipurl.com/2ofp4 Cheers -- Ariel Flesler http://flesler.blogspot.com/ On 24 jun, 23:27, jack <[EMAIL PROTECTED]> wrote: > Just a beginner's question. I found slice(start, end) seems doesn't > pick up that the last one specified by 'end'. Such as slice

[jQuery] Re: question about slice()

2008-06-24 Thread Karl Rudd
Correct, this is as intended. http://docs.jquery.com/Traversing/slice As noted in the docs, it behaves like the "native" JavaScript Array.slice function. "It extracts up to, but not including, the 'end' element (if no 'end' is specified, the default is the very last element)." - from