#10099 closed feature (plugin)
Include jQuery.find(array, function(element, index){...})
Reported by: | Owned by: | ||
---|---|---|---|
Priority: | undecided | Milestone: | None |
Component: | unfiled | Version: | 1.6.2 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
It would work like jQuery.grep but would would return true if the function returns true for some element or false otherwise.
Change History (3)
comment:1 follow-up: 2 Changed 12 years ago by
Owner: | set to [email protected]… |
---|---|
Status: | new → pending |
comment:2 Changed 12 years ago by
Status: | pending → new |
---|
Replying to dmethvin:
There is already a
.find()
and we wouldn't want to overload the semantics. Can you create an example (using another name) that demonstrates the desired functionality at jsFiddle.net?
Sorry, I don't understand why is that necessary, nor why would $.find conflict with $.fn.find since it doesn't make sense to keep the same semantics for $.find. You could call it anything you like, like findFirst, I really don't care as much as you provide some method that includes this behavior.
comment:3 Changed 12 years ago by
Resolution: | → plugin |
---|---|
Status: | new → closed |
It seems like a really bad idea to have the semantics of $.find
conflict significantly with $.fn.find
since that would confuse things. Sounds like this would be best done with a plugin and if we thought it was worthwhile we could pull it into core.
There is already a
.find()
and we wouldn't want to overload the semantics. Can you create an example (using another name) that demonstrates the desired functionality at jsFiddle.net?