JQuery JEditable - How to Add A Visible Edit Me Button?

javascript, jeditable, jquery, user-experience

Solution

Just add a event to the button which clicks on the jEditable field:

<span class="jeditable">jEditable field</span>
<input type="button" class="jeditable-activate" value="Edit me!" />

And in jQuery:

$('.jeditable-activate').click(function() {
    $(this).prev().click();
});

That should do it. After all, that's the same thing as the user clicking on the element.

Problem

i love this plugin but the reality is that most people won't realize at first that they can click on the text to edit. Ideally, it would be nice to add a Button next to the text or a simple [Edit] link that the user clearly sees but never gets submitted via ajax. Any ideas?

Original source