Side navigation
#7894 closed bug (wontfix)
Opened January 04, 2011 02:38PM UTC
Closed January 04, 2011 03:57PM UTC
Selector option:gt(-1) doesn't work
Reported by: | g_gus | Owned by: | |
---|---|---|---|
Priority: | undecided | Milestone: | 1.6 |
Component: | unfiled | Version: | 1.4.4 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
very similar to #5550 but with a use case that's imho not invalid:
In writing a pagination function it would be useful to have the :gt behave consistently, accepting -1 as a possible value.
Here's a simple use case:
Thanks.
Attachments (0)
Change History (2)
Changed January 04, 2011 03:39PM UTC by comment:1
_comment0: | Better yet, you could get rid of the custom selectors completely. http://jsfiddle.net/danheberden/yxQgd/ → 1294156233981330 |
---|---|
_comment1: | Better yet, you could get rid of the custom selectors completely. http://jsfiddle.net/danheberden/yxQgd/ \ \ Thanks for taking the time to write out a bug report / feature request. In the case of :gt, gt(-1) seems odd to me. gt(-1) is simply less than something else. That is, :gt(-1):lt(5) is simply lt(5). Plus, there is no -1 index to be greater than. I know if makes sense that index 0 is greater than anything, but -1 doesn't exist. \ \ Custom selectors aren't great in any respect, as the above example I pasted doesn't even have to use sizzle. Faster and cleaner; the gains are two fold. \ \ → 1294156287492186 |
Changed January 04, 2011 03:57PM UTC by comment:2
resolution: | → wontfix |
---|---|
status: | new → closed |
Better yet, you could get rid of the custom selectors completely. http://jsfiddle.net/danheberden/yxQgd/
Thanks for taking the time to write out a bug report / feature request. In the case of :gt, gt(-1) seems odd to me. gt(-1) is simply less than something else. That is, :gt(-1):lt(5) is simply lt(5). Plus, there is no -1 index to be greater than. I know if makes sense that index 0 is greater than any negative number, but -1 doesn't exist.
Custom selectors aren't great in any respect, as the above example I pasted doesn't even have to use sizzle. Faster and cleaner; the gains are two fold.