I am using jeditable plugin for inline editing. When I double click on the field to edit, the cursor stays ahead of the value. The value of the textbox is dynamically generated. I want something that when I click on New Folder, cursor should stay at the end of FOLDER. Here's my live Website , Where u can add a New Folder from the left sidebar and double click on generated New Folder.
I have tried few available solutions here on focus on input field, they work on a static textbox, but I couldn't make them work with this jeditable plugin. Any help will be highly appreciated.
Here's the jsfiddle to work on this plugin. JSFIDDLE
Below is my code of generating the editable folder in a list.
$('document').ready(function () {
txt_box = "<li class='animated bounceInDown foldertobedeleted' data-toggle='context' data-target='#context-menu' ><a class='folderlink'><span style='background-color:" + favorite + "' class='foldercount'>0</span><span class='editable foldername'>New Folder</span></a></li>";
$("#folderlist li:last").before(txt_box);
$('.editable').editable(function (value, settings) {
console.log(this);
console.log(value);
console.log(settings);
return (value);
}, {
type: 'text',
onblur: 'ignore',
event: 'dblclick',
tooltip: "Double Click to edit",
style: 'display: inline; ',
width: '125px',
});
});
});