title: Chaining selects with Chosen
body: <p>I'm trying to chain selects with <a href="https://github.com/harvesthq/chosen" rel="nofollow">Chosen</a> and <a href="http://www.appelsiini.net/projects/chained" rel="nofollow">Chained</a> but I'm not sure if I'm implementing .chosen().change() correctly or if the error I'm getting is a bug.</p>
  
  <p>Here's what I've got:</p>
  
  <pre><code>&lt;select id="Inputfield_date" name="date" data-placeholder="Select event date"&gt;
  &lt;option value=""&gt;&lt;/option&gt;
  &lt;option value="WA"&gt;WA&lt;/option&gt;
  &lt;option value="QLD"&gt;QLD&lt;/option&gt;
  &lt;option value="VIC"&gt;VIC&lt;/option&gt;
  &lt;option value="NSW"&gt;NSW&lt;/option&gt;
  &lt;option value="SA"&gt;SA&lt;/option&gt;
  &lt;/select&gt;
  
  &lt;select id="Inputfield_code" name="code" data-placeholder="Response code"&gt;
  &lt;option value=""&gt;&lt;/option&gt;
  &lt;option value="601" class="WA"&gt;601&lt;/option&gt;
  &lt;option value="602" class="WA"&gt;602&lt;/option&gt;
  &lt;option value="402" class="QLD"&gt;402&lt;/option&gt;
  &lt;option value="403" class="QLD"&gt;403&lt;/option&gt;
  &lt;option value="301" class="VIC"&gt;301&lt;/option&gt;
  &lt;option value="302" class="VIC"&gt;302&lt;/option&gt;
  &lt;option value="201" class="NSW"&gt;201&lt;/option&gt;
  &lt;option value="203" class="NSW"&gt;203&lt;/option&gt;
  &lt;option value="501" class="SA"&gt;501&lt;/option&gt;
  &lt;/select&gt;
  
  $('#Inputfield_date').chosen().change(function() {
      $("#Inputfield_code").chained("#Inputfield_date");
  });
  </code></pre>
  
  <p>which gives me <em>Uncaught RangeError: Maximum call stack size exceeded</em>.</p>
  
  <p>EDIT: I now also need to hide/show another field if a particular option is chosen and I'm not sure what the correct approach is for that.</p>