code: function(e, params) {
              //mark element with unsaved class if needed
              if(this.options.unsavedclass) {
                  /*
                   Add unsaved css to element if:
                    - url is not user's function 
                    - value was not sent to server
                    - params.response === undefined, that means data was not sent
                    - value changed 
                  */
                  var sent = false;
                  sent = sent || typeof this.options.url === 'function';
                  sent = sent || this.options.display === false; 
                  sent = sent || params.response !== undefined; 
                  sent = sent || (this.options.savenochange && this.input.value2str(this.value) !== this.input.value2str(params.newValue)); 
                  
                  if(sent) {
                      this.$element.removeClass(this.options.unsavedclass); 
                  } else {
                      this.$element.addClass(this.options.unsavedclass);                    
                  }
              }
              
              //highlight when saving
              if(this.options.highlight) {
                  var $e = this.$element,
                      bgColor = $e.css('background-color');
                      
                  $e.css('background-color', this.options.highlight);
                  setTimeout(function(){
                      if(bgColor === 'transparent') {
                          bgColor = ''; 
                      }
                      $e.css('background-color', bgColor);
                      $e.addClass('editable-bg-transition');
                      setTimeout(function(){
                         $e.removeClass('editable-bg-transition');  
                      }, 1700);
                  }, 10);
              }
              
              //set new value
              this.setValue(params.newValue, false, params.response);
              
              /**        
              Fired when new value was submitted. You can use <code>$(this).data('editable')</code> to access to editable instance
              
              @event save 
              @param {Object} event event object
              @param {Object} params additional params
              @param {mixed} params.newValue submitted value
              @param {Object} params.response ajax response
              @example
              $('#username').on('save', function(e, params) {
                  alert('Saved value: ' + params.newValue);
              });
              **/
              //event itself is triggered by editableContainer. Description here is only for documentation              
          }
docs: /*
  called when form was submitted