title: Create a dropdown menu from HTML headers and paragraphs
body: <p>Since I'm completely new to JavaScript and JQuery, I have some problems creating dropdown menus starting from a HTML document structured in this way:</p>
  
  <pre><code>&lt;h2&gt;Type 1&lt;/h2&gt;
  &lt;h3&gt;Model 1&lt;/h3&gt;
  &lt;a href="...."&gt;link 1&lt;/a&gt;
  &lt;a href="...."&gt;link 2&lt;/a&gt;
  &lt;a href="...."&gt;link 3&lt;/a&gt;
  &lt;h3&gt;Model 2&lt;/h3&gt;
  &lt;a href="...."&gt;link 1&lt;/a&gt;
  &lt;a href="...."&gt;link 2&lt;/a&gt;
  &lt;h2&gt;Type 2&lt;/h2&gt;
  &lt;h3&gt;Model 1&lt;/h3&gt;
  &lt;a href="...."&gt;link 1&lt;/a&gt;
  &lt;h3&gt;Model 2&lt;/h3&gt;
  &lt;a href="...."&gt;link 1&lt;/a&gt;
  &lt;a href="...."&gt;link 2&lt;/a&gt;
  &lt;a href="...."&gt;link 3&lt;/a&gt;
  </code></pre>
  
  <p>and so on.</p>
  
  <p>What I want is a first dropdown menu which shows my types, and a second one in which, after a type is selected, the models appear. When the model is selected too, the links should appear below the dropdown menus (also a third dropdown menu with the link texts and a "go" button is OK).</p>
  
  <p>It should be simple but I can't get to it! I've tried different ways but nothing :-(.</p>
  
  <p>Anyone has hint for me?</p>
  
  <p>P.S. Sorry for my bad English.</p>
  
  <p>@Zapp: am I missing something or the code should be so?</p>
  
  <pre><code>&lt;ul&gt;
    &lt;li&gt;
      &lt;h2&gt;Type 1&lt;/h2&gt;
      &lt;ul&gt;
        &lt;li&gt;
          &lt;h3&gt;Model 1&lt;/h3&gt;
          &lt;ul&gt;
            &lt;li&gt;&lt;a href="...."&gt;link 1&lt;/a&gt;&lt;/li&gt;
            &lt;li&gt;&lt;a href="...."&gt;link 2&lt;/a&gt;&lt;/li&gt;
            &lt;li&gt;&lt;a href="...."&gt;link 3&lt;/a&gt;&lt;/li&gt;
          &lt;/ul&gt;
        &lt;/li&gt;
        &lt;li&gt;
          &lt;h3&gt;Model 2&lt;/h3&gt;
          &lt;ul&gt;
            &lt;li&gt;&lt;a href="...."&gt;link 1&lt;/a&gt;&lt;/li&gt;
            &lt;li&gt;&lt;a href="...."&gt;link 2&lt;/a&gt;&lt;/li&gt;
          &lt;/ul&gt;
        &lt;/li&gt;
      &lt;/ul&gt;
    &lt;/li&gt;
    &lt;li&gt;
      &lt;h2&gt;Type 2&lt;/h2&gt;
      &lt;ul&gt;
        &lt;li&gt;
          &lt;h3&gt;Model 1&lt;/h3&gt;
          &lt;ul&gt;
            &lt;li&gt;&lt;a href="...."&gt;link 1&lt;/a&gt;&lt;/li&gt;
          &lt;/ul&gt;
        &lt;/li&gt;
        &lt;li&gt;
          &lt;h3&gt;Model 2&lt;/h3&gt;
          &lt;ul&gt;
            &lt;li&gt;&lt;a href="...."&gt;link 1&lt;/a&gt;&lt;/li&gt;
            &lt;li&gt;&lt;a href="...."&gt;link 2&lt;/a&gt;&lt;/li&gt;
            &lt;li&gt;&lt;a href="...."&gt;link 3&lt;/a&gt;&lt;/li&gt;
          &lt;/ul&gt;
        &lt;/li&gt;
      &lt;/ul&gt;
    &lt;/li&gt;
  &lt;/ul&gt;
  </code></pre>
  
  <p>Anyway, thanks for all the help you are giving me! I'm near the result I want :)</p>