Search code examples
ajaxjeditable

jEditable: Eliminate AJAX requests if data hasn't changed


Anyone see potential problems with optimizing away unnecessary ajax requests like this:

$('.editable').editable(function(value, settings)
{
  // check if changed at all
  if(this.revert == value)
  {
    this.reset()
    return
  }

  ... fire ajax request
}

Solution

  • looks good to me.