vitalets / x-editable

In-place editing with Twitter Bootstrap, jQuery UI or pure jQuery
http://vitalets.github.io/x-editable
MIT License
6.51k stars 1.73k forks source link

I want to show the edit form automatically when it added #1135

Open boxter007 opened 5 years ago

boxter007 commented 5 years ago

I want to add a editable named 'var' , and I want to show the edit form automatically when it added.But the form shows and soon disappears. How can I do it ? How to correct this code below

$('#var').trigger('click.editable');

Full code

$('#var').editable({
            type: "text",
            url: '../',
            type: 'text',
            name: 'name',
            success: function(response, newValue) {
                    console.log(response);
            }
        });
        $('#var').trigger('click.editable');