Keep jeditable when focus is lost?

(How) can I configure jeditable to keep the text when focus is lost from the text area? If you don't submit the submit / cancel buttons, then when you press 'Enter' the content is saved ... but I haven't found how to keep the content in focus.

+2


a source to share


1 answer


You can do this by setting a parameter onblur

, for example:

$('.editable').editable('myPage.php', {
  onblur: 'submit'
});

      

Inside jEditable, this happens:



} else if ('submit' == settings.onblur) {
   input.blur(function(e) {
     t = setTimeout(function() { form.submit(); }, 200);
   });
}

      

The onblur

tabs are at the bottom of the jEditable message , just look for "onblur" on the page.

+10


a source







All Articles