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

reassigning fastclick doesnt override old handler #15

Open
sra448 opened this issue Jun 26, 2012 · 1 comment
Open

reassigning fastclick doesnt override old handler #15

sra448 opened this issue Jun 26, 2012 · 1 comment

Comments

@sra448
Copy link

sra448 commented Jun 26, 2012

hi there

when I have a button that I have a fastclick handler on, and I try to assign a new handler to it, the old one will remain and FastButtons onclick method will trigger twice (the old one and the new one).

This is because we don't unbind the old events when binding new ones. To solve this, we could either just unbind everything from the button before binding again or on the other hand, we might make some sort of .on .off behaviour to it.

what do you think?

@dave1010
Copy link
Owner

I'm not quite sure what you mean by this. jQuery's click doesn't remove/override old handlers (see http://jsfiddle.net/bMaGy/ for a demo). Am I misunderstanding you?

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

No branches or pull requests

2 participants