title: how to change select2 value programmatically
body: <p>I have a select2 box in bootstrap modal, I want to change the value of the select2 box but it didn't work.</p>
  
  <p>I tried every single solution in previous posts and results but none of them got it work.</p>
  
  <p>I use <strong>select2 4.0.2</strong>, I tested:</p>
  
  <pre><code>$('#select_id').val('val').trigger('change.select2');
  
  $('#select_id').val('val').trigger('change');
  
  $('#select_id').val('val').change()
  </code></pre>
  
  <p>It works one or two times then it stops working (randomly)</p>
  
  <hr>
  
  <p>It works fine only when I change the select2 back to 3.x.x</p>