title: Can't get jQuery chained ajax selects working
body: <p>I'm trying to implement chained ajax selects from this jQuery plugin: <a href="http://www.appelsiini.net/projects/chained" rel="nofollow noreferrer">http://www.appelsiini.net/projects/chained</a></p>
  
  <p>I'm using the remote method.</p>
  
  <p>I have a problem where my select boxes show the "default" (blank) value last in the select as seen here:</p>
  
  <p><img src="https://i.imgur.com/DDUj9.png" alt=""></p>
  
  <p>This is a problem because I have 5 chains, so when the blank value isn't selected by default, it does 5 sequential lookups. It also isn't working like it shows on the demo page where the default value is selected by default instead of a real value.</p>
  
  <p>A JSON request from my server returns this:</p>
  
  <pre><code>{"":"","1":"Test #1","2":"Test #2"}
  </code></pre>
  
  <p>So as you can see, it's not the order that my JSON is returning.</p>
  
  <p>This is my HTML:</p>
  
  <pre><code>&lt;label class="control-label" for="branch"&gt;Branch&lt;/label&gt;
  &lt;select id="branch" name="branch"&gt;
      &lt;option value=""&gt;&lt;/option&gt;
      &lt;option value="1"&gt;Foo&lt;/option&gt;
      &lt;option value="2"&gt;Bar&lt;/option&gt;
  &lt;/select&gt;
  &lt;label class="control-label" for="facility"&gt;Facility&lt;/label&gt;
  &lt;select id="facility" name="facility"&gt;
      &lt;option value=""&gt;&lt;/option&gt;
  &lt;/select&gt;
  
  &lt;script src="/js/chained.js"&gt;&lt;/script&gt;
  &lt;script&gt;
      $(document).ready(function() {
          $("#facility").remoteChained("#branch", "/src/record.json.php");
      } );
  &lt;/script&gt;
  </code></pre>
  
  <p>So now I'm lost and since I can't read/write JavaScript very well, I'm hoping someone can see the issue and help me out.</p>