title: select2 add class to selected option
body: <p>I want to add class to <strong>option</strong> in select2, so after i click on suggest list item it will add custom class <strong>added-to-select-multiple</strong> to the main select structure.</p>
  
  <p>Here's example code: </p>
  
  <pre><code>&lt;select id="myselect2" multiple="multiple" style="width:50%;"&gt;
      &lt;option&gt;One&lt;/option&gt;
      &lt;option&gt;Another option&lt;/option&gt;
      &lt;option&gt;Hello there&lt;/option&gt;
  &lt;/select&gt;
  </code></pre>
  
  <p>After i click on first element of suggest list :</p>
  
  <p>_________<strong>HTML output from inspect</strong>___________________</p>
  
  <pre><code>&lt;select id="myselect2" multiple="" style="width:50%;" data-select2-id="myselect2" tabindex="-1" class="select2-hidden-accessible" aria-hidden="true"&gt;
  // result 
    &lt;option data-select2-id="4" class="added-to-select-multiple"&gt;One&lt;/option&gt;
    &lt;option data-select2-id="5"&gt;Another option&lt;/option&gt;
    &lt;option data-select2-id="6"&gt;Hello there&lt;/option&gt;
  &lt;/select&gt;
  </code></pre>
  
  <p>How to achive that? I was experimenting with : </p>
  
  <pre><code>$('#myselect2').trigger({
          type: 'select2:select',
  
  });
  </code></pre>
  
  <p>but i haven't found the solution, i think i wasn't even close.</p>
  
  <p>Fiddle: <a href="https://jsfiddle.net/Friiz/19rootn5/1/" rel="nofollow noreferrer">https://jsfiddle.net/Friiz/19rootn5/1/</a></p>
  
  <p><strong>Thanks for any help!</strong></p>