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 delegate example in README.md #52

Closed
commonpike opened this issue Oct 28, 2014 · 1 comment
Closed

add delegate example in README.md #52

commonpike opened this issue Oct 28, 2014 · 1 comment
Labels
invalid The issue is invalid, the problem is outside the scope of developer support, or another invalidity.

Comments

@commonpike
Copy link

Hi

great lib.

important point for me is, events can be delegated, that is, they can be assigned to elements that are added dynamically to the page later. it doesnt specifically say so in the docs, had to test it .. but it seems to work just fine

$(document).on('tap','.photo',function() { alert('you tapped on a photo that wasnt here when i bound this event'); });
@benmajor benmajor added the invalid The issue is invalid, the problem is outside the scope of developer support, or another invalidity. label Oct 30, 2014
@benmajor
Copy link
Owner

Thanks for your comments. The documentation does state:

All of the events outlined above have been written using jQuery's event.special object, and so can be used in conjunction with jQuery's event handling functions, as well as shortcut wrappers.

I think that covers event delegation, so I'll mark this as an invalid.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
invalid The issue is invalid, the problem is outside the scope of developer support, or another invalidity.
Projects
None yet
Development

No branches or pull requests

2 participants