The basic usage of the plugin looks simple but it does not work for me. I am using Firefox and Chrome.
html code:
<div class="editable"> limited to 200 char my private messages</div>
js code:
$('div.editable').click(function() { $this.editable();});
When I click the text inside the div on my page, nothing happens.
I viewed my source code and both jquery and editable JavaScript files are there.
What’s wrong with my code?
I believe you may want to call
$('div.editable').editable()immediately (or in$(document).ready()) to mark thedivas editable. The handling of going into edit mode upon clicking thedivshould be automatically done by the plugin.Otherwise, after changing
$thisto$(this)you may have to click twice to enter edit mode for the first time. Or it might not work at all when repeatedly making the same element editable (which depends on how the plugin handles this scenario).