x-editable - adjusting the width of input field

Daniel picture Daniel · May 9, 2013 · Viewed 33.5k times · Source

How do you adjust the input width of the popup

it doesn't seem like there is any option for it in

http://vitalets.github.io/x-editable/docs.html#text

Answer

Sudhir Bastakoti picture Sudhir Bastakoti · May 9, 2013

you could use inputclass option to provide a CSS class, where you can add the width for input field, like

<a href="#" id="username" data-type="text" data-pk="1">awesome</a>
<script>
$(function(){
    $('#username').editable({
        url: '/post',
        title: 'Enter username',
        inputclass: 'some_class'
    });
});
</script>

And css:

.some_class{
   width: 240px;
}