title: jquery on() method Maximum call stack size exceeded
body: <p>Why I am getting this error:</p>
  
  <blockquote>
    <p>Uncaught RangeError: Maximum call stack size exceeded</p>
  </blockquote>
  
  <p>Here is my code:</p>
  
  <pre><code>$(document).on('keypress focusout', '.checklist-item-input', function (e) {
    if (e.which == 13 || e.type == 'focusout') {
      $('.checklist-item').removeClass('edit');
      $(this).siblings('.checklist-item-detail').text($(this).val());
      $(this).blur();
      $('.checklist-item-detail').each(function () {
        if (!$(this).text().length) {
          $(this).closest('.checklist-item').parent().remove();
        }
      });
    }
  });
  </code></pre>