title: Set multiple options in Chosen from JS
body: <p>I am using <a href="https://github.com/harvesthq/chosen" rel="nofollow noreferrer">chosen.js</a> for my multiselect dropdown. I want to set <code>multiple</code> <code>true</code> or <code>false</code> from JS, but I can't set it. How can I do that?</p>
  
  <blockquote>
    <p>HTML :</p>
  </blockquote>
  
  <pre><code>&lt;select name="test" id="id"&gt;
     &lt;option value=""&gt;-- Select an option --&lt;/option&gt;
     &lt;option class="item" name="test" value="21" data-url="URL"&gt;A&lt;/option&gt;
     &lt;option class="item" name="test" value="22" data-url="URL"&gt;B&lt;/option&gt;
     &lt;option class="item" name="test" value="23" data-url="URL"&gt;C&lt;/option&gt;
  &lt;/select&gt;
  </code></pre>
  
  <blockquote>
    <p>JS :</p>
  </blockquote>
  
  <pre class="lang-js prettyprint-override"><code>require([
    'jquery',
    'chosen'
  ], function($, chosen) {
    $('#id').chosen({
      width: '100%',
      multiple: true,
      //multiple: 'multiple', also tried this
      placeholder_text: "Select Options"
    });
  })
  </code></pre>
  
  <blockquote>
    <p><strong>Note: I don't want to set it in the HTML code directly.</strong></p>
  </blockquote>
  
  <p><strong>UPDATE (Output) :</strong></p>
  
  <p><a href="https://i.stack.imgur.com/QkziC.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/QkziC.png" alt="enter image description here"></a></p>