I\'m trying to use Jeditable as an inline editing solution.
The default behavior (click on the element to edit it) works quite well, but I would like to activate an
Above code is not quite correct either. It triggers click event on ALL Jeditable instances.
There are many ways to do it and it all depends on your HTML, but for example if you have following HTML:
Editable text
Edit me!!
Then you can use following JavaScript:
/* Bind Jeditable instances to "edit" event. */
$(".edit").editable("http://www.example.com/save.php", {
event : "edit"
});
/* Find and trigger "edit" event on correct Jeditable instance. */
$(".edit_trigger").bind("click", function() {
$(this).prev().trigger("edit");
});