jQuery events are lost after form reload
You need to use the drupal behaviors: if you run your code on ready function when the form is rebuilded on an ajax action all the handlers you have active will disapear because the item fields are replaced by the new ones.

This is the basic drupal behaviors template:

(function ($) {
  Drupal.behaviors.mymodulecustombehavior = {
    attach: function (context, settings) {

      // Execute your code

    }
  };
})(jQuery);


This way after a ajax, all you code inside this behaviour will be called again. 

Maybe you will want to add .once() property to avoid execute some parts of your code twice.

Documentation: https://www.drupal.org/node/756722