Tuesday, October 12, 2010

jeditable maxlength

In jquery.jeditable.js add:
if (settings.maxlength) { input.attr('maxlength', settings.maxlength); }

right below:
if (settings.height != 'none') { input.height(settings.height); }



Then set maxlength
$('.loremipsum').editable('http://www.example.com/save.php', {
    ...
    maxlength: 20
});

reference: http://www.appelsiini.net/projects/jeditable (user Sasi's comment)

1 comment:

JoJo said...

Thanks for the tip - just what I was looking for and works perfectly :)