NicolasCARPi / jquery_jeditable

jQuery edit in place plugin. Extendable via plugin architecture. Plugins for plugin. Really.
https://jeditable.elabftw.net
MIT License
1.74k stars 459 forks source link

OnSubmit "Spinner" and Check if Server Returned Error Do Not Hide the Edit #162

Closed tetrahydra closed 6 years ago

tetrahydra commented 6 years ago

Hello

I would like to know how can I achieve this:

  1. When clicked save, show "spinner" icon.

  2. After submitted to the server and wait for the ajax return (OK or ERROR), if error, then do not hide the edit input/textarea.

NicolasCARPi commented 6 years ago

Hello,

You can maybe use the 'onsubmit', 'before' or 'callback' options to run what you want when you want ;)

See the Complete example on the demo source code.