title: jQuery UI Populate Select Menu from the Database
body: <p>So I have these two jQuery select menus and and based on what is selected in one menu, an ajax call is made to get data for the next select menu. I believe I will have to iterate over data and list items to populate the html for the second select when the 'selectmenu' event of the first select is triggered. I've been looking at the structure of the select menu and I see the div's at the bottom of the page for both selects are like.</p>
  
  <pre><code>&lt;div class="ui-selectmenu-menu ui-front"&gt;&lt;/div&gt;
  </code></pre>
  
  <p>Ofcourse one that has options shows populated li tags whereas the other one only shows one empty li item.</p>
  
  <p>My questions is that once I iterate and create the html markup for second select. How do I know which div to append that in? Both have the same classes on the outermost container (Div): ui-selectmenu-menu ui-front</p>
  
  <p>Thank you!</p>