title: Maximum call stack size exceeded, infinite loop
body: <p>I have three Select2 boxes. When I change one, all the not-clicked ones need to be reset. When I do this, it causes an infinite loop and I get the error listed in the title. How can I solve this?</p>
  
  <pre><code>var group = $(".searchgroup1");
  
  group.on('change', function(){
      var box = group.index($(this));
      group.each(function(index){
          if(box != index){
              $(this).val(null).trigger("change"); // &lt;-- this resets the &lt;select&gt;
              //If I remove the code up here, the infinite loop disappears
          }
      });
  });
  </code></pre>