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

Unbind #12

Open
martinslae opened this issue Dec 6, 2016 · 1 comment
Open

Unbind #12

martinslae opened this issue Dec 6, 2016 · 1 comment

Comments

@martinslae
Copy link

martinslae commented Dec 6, 2016

How to unbind editable of a control?

Thanks

@schester44
Copy link

schester44 commented Dec 13, 2016

I would imagine something like $(this).unbind(<action>) would work. Where this is the element with the .editable class, and <action> is the class to trigger editable (click, dblclick), etc...

if you want to remove the editable ability from the field, just removeClass('editable').

If you want to unbind the previous editable action before running the editable action again, inside your jquery.editable.js, near the bottom in the edit.register function, you can do trigger.unbind(action).bind(action, edit.start); or something similar.

I just had to do the unbind(action) thing in my current project due to a bug where my code was calling the editable plugin multiple times on a single element/input which was causing the input to become blank and lose the e.target.old_value

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