title: drop down submenu in javascript
body: <p>hope my question is clear</p>
  
  <p>On pressing on the unique button i have on this page, i want to display the menu having three elements only.</p>
  
  <p>the "Languages" item menu wraps a submenu that  i want to display only if the user clicks on "Languages"</p>
  
  <p>however for the moment whenever i click  on the button, not only the menu appears but also the submenu; and that is not what i want to have.</p>
  
  <p>can you please inform me what is wrong with my code please?</p>
  
  <p><a href="http://i.stack.imgur.com/JeEaJ.png" rel="nofollow">enter image description here</a></p>
  
  <p>Code:</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>function myFunction2() {
    document.getElementById("myDropdown").classList.toggle("show");
  }
  
  function myFunction3() {
    document.getElementById("languageslist").classList.toggle("show");
  
  }</code></pre>
  <pre class="snippet-code-css lang-css prettyprint-override"><code>.dropdown {
    position: relative;
    display: inline-block;
  }
  .dropdown-content {
    display: none;
    position: absolute;
    background-color: #f9f9f9;
    min-width: 160px;
    overflow: auto;
    border: 1px solid black;
  }
  .dropdown-content a {
    color: black;
    padding: 12px 16px;
    text-decoration: none;
    display: block;
  }
  .dropdownb {
    position: relative;
    display: inline-block;
  }
  .show {
    display: block;
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;div class="dropdown"&gt;
    &lt;button id="btn" onclick="myFunction2()"&gt;Show&lt;/button&gt;
    &lt;div id="myDropdown" class="dropdown-content"&gt;
      &lt;p&gt;Countries&lt;/p&gt;
      &lt;p id="btnl" onclick="myFunction3()"&gt;Languages&lt;/p&gt;
      &lt;div id="languageslist"&gt;
        &lt;a href=""&gt;English&lt;/a&gt;
        &lt;a href=""&gt;Spanish&lt;/a&gt;
        &lt;a href=""&gt;German&lt;/a&gt;
      &lt;/div&gt;
      &lt;p&gt;Continents&lt;/p&gt;
    &lt;/div&gt;
  &lt;/div&gt;</code></pre>
  </div>
  </div>
  </p>