I’m using jquery and the editable plugin.
Works ace and we’re very happy.
However, my boss wants a link/div just to the side of the editable div saying edit.
Clicking that will pop up the editable field.
I’ve used:
$('#my_edit_button_id').click(function() {
$('.my_editable_div').focus();
});
$('.my_editable_div').editable(/* my settings */);
<div class="my_editable_div"></div>
<div id="my_edit_button_id">Edit info</div>
class my_editable_div works great on its own.. but focus is not focusing the mouse.
Anyone come across this before?
I’ll continue to scour the jQuery docs…
I would guess that the best way to do this would be to trigger the
clickhandlers on thedivitself, since it seems to be clicking on the editable element that causes it to change and to receive focus:NB that I’m not familiar with this plugin — it’s just a reasoned guess based on the docs.