AnanthaKN / jquery-in-place-editor

Automatically exported from code.google.com/p/jquery-in-place-editor
Other
0 stars 0 forks source link

How to remove edit behaviour #87

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
Is there any way to remove the in-place editing behaviour of an element once it 
is initiated?

Original issue reported on code.google.com by sunish.k...@gmail.com on 16 Mar 2011 at 9:44

GoogleCodeExporter commented 8 years ago
The comment inside the Javascript demo says to do:

$(selectorForEditors).unbind('.editInPlace')

In fact, this only works once. Re-enabling in-place editing will not work. 
Instead, disable using:

$(selectorForEditor).unbind('.editInPlace');
$(selectorForEditor).data('editInPlace',false);

I only learned about this by reading the source. This should be documented 
somewhere.

Original comment by eel...@xs4all.nl on 5 May 2011 at 11:59