title: jQuery fade out not working
body: <p>I have this button with the ID "trigger" where I trigger the overlay when it has been clicked on. But when clicking on "trigger" again, the overlay won't close. Anyone know what the problem is?</p>
  
  <p>My code:</p>
  
  <pre><code>&lt;script&gt;
    $(function() {
      $('#trigger').click(function() {
        $('#overlay').fadeIn(500);
      });
      $('#overlay, .overlayFadeOut').click(function() {
        $('#overlay').fadeOut(500);
        $('.navbar-toggle').toggleClass("active");
      });
    });
  
  &lt;/script&gt;
  </code></pre>
  
  <p>HTML</p>
  
  <pre><code>&lt;div class="row"&gt;
    &lt;div class="col-md-7 col-sm-6 col-xs-4"&gt;
      &lt;button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse" id="trigger" style="z-index: 99999999"&gt;
        &lt;span class="icon-bar"&gt;&lt;/span&gt;
        &lt;span class="icon-bar"&gt;&lt;/span&gt;
        &lt;span class="icon-bar"&gt;&lt;/span&gt;
      &lt;/button&gt;
  
    &lt;/div&gt;
  &lt;/div&gt;
  
  &lt;/div&gt;
  &lt;/section&gt;
  
  &lt;!-- overlay --&gt;
  &lt;div id="overlay" data-toggle="collapse" data-target=".navbar-collapse"&gt;&lt;/div&gt;
  
  &lt;!-- navigation --&gt;
  &lt;div class="nav-container"&gt;
  
    &lt;nav class="navbar navbar-fixed-top" style="z-index: 10"&gt;
  
      &lt;div class="navbar-header"&gt;
      &lt;/div&gt;
  
      &lt;div class="navbar-collapse collapse"&gt;
  
        &lt;div id="menu-outer"&gt;
          &lt;div class="Table"&gt;
            &lt;ul class="nav navbar-nav" id="horizontal-list"&gt;
              &lt;li class="active overlayFadeOut" data-toggle="collapse" data-target=".navbar-collapse"&gt;&lt;a href="index.html"&gt;home&lt;/a&gt;&lt;/li&gt;
              &lt;li class="overlayFadeOut" data-toggle="collapse" data-target=".navbar-collapse"&gt;&lt;a href=""&gt;Lorem&lt;/a&gt;&lt;/li&gt;
              &lt;li class="overlayFadeOut" data-toggle="collapse" data-target=".navbar-collapse"&gt;&lt;a href=""&gt;Ipsum&lt;/a&gt;&lt;/li&gt;
              &lt;li class="overlayFadeOut" data-toggle="collapse" data-target=".navbar-collapse"&gt;&lt;a href=""&gt;Dolor&lt;/a&gt;&lt;/li&gt;
              &lt;li class="overlayFadeOut" data-toggle="collapse" data-target=".navbar-collapse"&gt;&lt;a href=""&gt;Sit&lt;/a&gt;&lt;/li&gt;
            &lt;/ul&gt;
          &lt;/div&gt;
        &lt;/div&gt;
  
  
      &lt;/div&gt;
    &lt;/nav&gt;
  
  &lt;/div&gt;
  </code></pre>