#3274 closed bug (wontfix)
.slice() misses "end" selection
Reported by: | djot | Owned by: | |
---|---|---|---|
Priority: | major | Milestone: | 1.3 |
Component: | core | Version: | 1.2.6 |
Keywords: | slice | Cc: | |
Blocked by: | Blocking: |
Description
- hi,
the slice function DOES NOT include the "end" argument, which is really stupid.
See attached screenshots:
- 3,4 only selects ONE div
- 4,6 misses the sixth div (count from zero)
I doubt that this is the wanted behaviour - anyway if it is NOT a bug, than please change the documentation saying the last "end" element is not included in the selection.
djot -
Attachments (2)
Change History (5)
Changed 14 years ago by
Attachment: | bug_slice_34.gif added |
---|
Changed 14 years ago by
Attachment: | bug_slice_46.gif added |
---|
comment:1 Changed 14 years ago by
Resolution: | → wontfix |
---|---|
Status: | new → closed |
comment:2 Changed 14 years ago by
copied from your link:
"
end
Zero-based index at which to end extraction. slice extracts up to but not including end.
slice(1,4) extracts the second element through the fourth element (elements indexed 1, 2, and 3).
"
comment:3 Changed 14 years ago by
I know, it does skip the last as that page says. That's how it works.
Note: See
TracTickets for help on using
tickets.
jQuery.fn.slice works exactly as Array.prototype.slice (the latter is actually used).
docs.jquery.com is down now, I'll check how is it documented, later.