anchor.diff:      selectElems[1].setAttribute('id',   newId   + 'unit_id'  );
   
       newRow.find('a.js-deleteIngredient')[0].setAttribute('data-recipe-ingredient-id', '');
  +    newRow.find('a.js-deleteIngredient')[0].addEventListener('click', deleteIngredient, false);
   
       selectElems.find('option').each(function(i, e) {
         e.removeAttribute('selected');
  
positive.code: 
      ingredientTable.append(newRow);
      e.preventDefault();
    });
  
    $('.js-addStep').on('click', function(e) {
      var stepTable = $('#stepTable tbody');
      var newRow    = stepTable.find('tr:first').clone();
      var newRowId  = stepTable.find('tr').length;
  
negative.code:     textareaElems.text('');
  
      newRow.find('a.js-deleteStep')[0].setAttribute('data-recipe-step-id', '');
      newRow.find('a.js-deleteStep')[0].addEventListener('click', deleteStep, false);
  
      stepTable.append(newRow);
      e.preventDefault();
    }
  
    //  Delete a recipe ingredient from the recipe.
    function deleteIngredient(e) {
      if (confirm('Are you sure?') == true) {
        // Hide the row.
        $(this).parent().parent().hide();
        $(this).parent().parent()[0].setAttribute('style', 'display:none');
      }
      e.preventDefault();
    }
  
    //  Delete a recipe ingredient from the recipe.
    function deleteStep(e) {
      if (confirm('Are you sure?') == true) {
        // Hide the row.
        $(this).parent().parent().hide();
        $(this).parent().parent()[0].setAttribute('style', 'display:none');
      }
      e.preventDefault();
    }
  });
  </script>
  