title: chosen.js :: Does anyone have an actual working example?
body: <p>Has anyone used and customized some basic chosen.js code?</p>
  
  <p>I have downloaded the js, css and png, copied some code from the examples, wrote my own super-simple example, but I must be missing something. I have verified that the code.jquery.js is included and gets loaded, same with the chosen.css.</p>
  
  <p>When I try to bring up even an extremely simple SELECT field (drop-down), I get a very small field, and clicking the field does nothing. When I disable chosen.js, I simply get the SELECT with all the options displayed.</p>
  
  <p>Here's how I add a simple SELECT within jQuery (I have to populate the field dynamically, although in this example it's all hard-coded):</p>
  
  <pre><code>    $html = '&lt;select name="items" id="items" multiple="multiple" size="1" class="chosenElement"&gt;';
      $html += '&lt;option value="foo"&gt;foo&lt;/option&gt;';
      $html += '&lt;option value="bar"&gt;bar&lt;/option&gt;';
      $html += '&lt;option value="baz"&gt;baz&lt;/option&gt;';
      $html += '&lt;option value="qux"&gt;qux&lt;/option&gt;';    
      $html += '&lt;/select&gt;';
  </code></pre>
  
  <p>Then, right when I display the modal dialog box containing the options, I call:</p>
  
  <pre><code>$('.modal-body').html($html);
  $('.chosenElement').chosen();
  </code></pre>
  
  <p>So far, I have modified and tested all kinds of permutations, Googled for solutions or examples, but nothing seems to work. It's probably something very silly, like a missing semi-colon somewhere, but I've wasted so much time on this "10-minute implementation" that I need to ask for soem help.</p>
  
  <p><a href="https://github.com/harvesthq/chosen" rel="noreferrer">https://github.com/harvesthq/chosen</a></p>