title: create jquery array to use as options
body: <p>I'm sure this is really simple, but I can't seem to get it working. I have a &quot;time&quot; select list, which has a number as &quot;rel&quot; attached to each option. If the user changes the time selected, I want a new list of options to display depending on what is selected. Does that make sense?</p>
  <p>Here's my first select:</p>
  <pre><code>&lt;select name=&quot;time&quot; id=&quot;time&quot;&gt;
    &lt;option value=&quot;7:00am&quot; rel=&quot;10&quot;&gt;7:00am&lt;/option&gt;
    &lt;option value=&quot;12:30pm&quot; rel=&quot;16&quot;&gt;12:30pm&lt;/option&gt;
  &lt;/select&gt;
  </code></pre>
  <p>If the user selects 7:00am, I want a new option list (using jquery) to give options from 1 - 10. Like this:</p>
  <pre><code>&lt;select name=&quot;quantity&quot; id=&quot;quantity&quot;&gt;
    &lt;option value=&quot;1&quot;&gt;1&lt;/option&gt;
    &lt;option value=&quot;2&quot;&gt;2&lt;/option&gt;
    &lt;option value=&quot;3&quot;&gt;3&lt;/option&gt;
    ............................
    &lt;option value=&quot;10&quot;&gt;10&lt;/option&gt;
  &lt;/select&gt;
  </code></pre>
  <p>Here's what I have so far...</p>
  <pre><code>&lt;script type=&quot;text/javascript&quot; language=&quot;javascript&quot;&gt;
    jQuery(&quot;#time&quot;).change(function(){
      var positions = jQuery(&quot;#time :selected&quot;).attr(&quot;rel&quot;); //this grabs the rel from time
  
      //this is where it should create a list of options to append(??) to the select list.
  
      jQuery(&quot;#showQuantity&quot;).show(); //this shows the hidden field for quantity
    });
  &lt;/script&gt;
  </code></pre>
  <p>I hope it makes sense, but I'm stuck on it.</p>