New Version of Editable Plugin

Alert! Alert! Another boring new release is out blog entry ahead. If you are bored already go ahead and download latest (1.5.0 at time of writing) Jeditable source, minified (recommended) or packed.

More info and should-be-better documentation at project page.

What is new or changed?

  • Added placeholder parameter. This can be html on plaintext string. It will be shown when editable element is empty.
  • Returned JavaScript is now executed. Allows us
    to do tricks like returning <script>alert(‘Saved!’)</from> from the save
    script.
  • Hacks which supported old getload and postload parameters are now removed. Use loadurl and loadtype instead.
  • Callback should now be given in options hash not as third parameter.

Usage of new or changed options below:

 $(".editable").editable("http://www.example.com/save.php", {
     placeholder : "Click me to edit",
     loadurl : "http://www.example.com/load.php",
     loadtype : "POST",
     callback: function(value, settings) {
         console.log(this);
         console.log(value);
         console.log(settings);
     }
 });

Thanks

Thanks to Ole Laursen, Dylan Verheul and Mariano Iglesias for providing patches and ideas!

Tagged with: Jeditable   Jquery  

Most read tags

Lazy Load   Ruby   AVR  
Electronics   JavaScript  
Jeditable   Maps   jQuery  
Facebook   HTML5   Chained  
Estonia  

Google+