Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add .invoke() method to collections #24

Closed
ricardobeat opened this issue Mar 31, 2013 · 1 comment
Closed

Add .invoke() method to collections #24

ricardobeat opened this issue Mar 31, 2013 · 1 comment

Comments

@ricardobeat
Copy link
Member

Since we don't have a few helper methods like focus(), would be nice to have invoke operate on a collection:

form.find('input').invoke('focus')

It could automatically map() over the elements for return values, unlike attr and other methods that return only the first value:

list.find('li').invoke('getAttribute', 'id') // => ['a', 'b', 'c']
@jcemer
Copy link
Member

jcemer commented Mar 31, 2013

Sounds nice!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants