How to update multiple fields using ajax?
You can use ajax_command_replace() when replacing more than one element/field. Check this ans. The answer says as:


  Instead of returning the HTML of the single element to update, your
  ajax callback can return an array of ajax commands. So it can return
  two ajax_command_replace to replace each element.