title: How can I make a div fade out when it is clicked?
body: <p>So basically I have a button and when the user clicks it, a div fades in. I would like it to fade out when the user clicks anywhere on the div. (the div takes up the entire screen) </p>
  
  <p>Here is what I have so far, it basically just fades in the div when you click the "about" button. I need it to fade out whenever I click anywhere on the screen.
  <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() {
    
    $('#fadeContent').click(function(){
      $('#bodyContent').fadeIn(500);
    });
    
  });</code></pre>
  <pre class="snippet-code-css lang-css prettyprint-override"><code>body {
    background-color: black;
    font-family: "Source Sans Pro", sans-serif;
    color: #ccc;
    z-index: -100;
    background-color:black;
  }
  
  #bodyContent{
    display:none;
    position:absolute;
    top:0;      left;0;
    width:100%; height:100%;
    background:#454545;
    z-index: 100;
  }
  
  #home {
      position: absolute;
      width: 16%;
      background-color: transparent;
      border: 2px solid #FFF;
      margin-top: 12%;
      margin-left: 20%;
      height: 3em;
      color: #FFF;
      font-size: 1em;
      cursor: pointer;
      text-transform: uppercase;
      border-radius: 4px;
      animation: fadein 2s;
      -moz-animation: fadein 2s; /* Firefox */
      -webkit-animation: fadein 2s; /* Safari and Chrome */
  }
  
  .about {
      position: absolute;
      width: 16%;
      background-color: transparent;
      border: 2px solid #FFF;
      margin-top: 12%;
      margin-left: 37%;
      height: 3em;
      color: #FFF;
      font-size: 1em;
      cursor: pointer;
      text-transform: uppercase;
      border-radius: 4px;
      animation: fadein 2s;
      -moz-animation: fadein 2s; /* Firefox */
      -webkit-animation: fadein 2s; /* Safari and Chrome */
  }
  
  #projects {
      position: absolute;
      width: 16%;
      background-color: transparent;
      border: 2px solid #FFF;
      margin-top: 12%;
      margin-left: 54%;
      height: 3em;
      color: #FFF;
      font-size: 1em;
      cursor: pointer;
      text-transform: uppercase;
      border-radius: 4px;
      animation: fadein 2s;
      -moz-animation: fadein 2s; /* Firefox */
      -webkit-animation: fadein 2s; /* Safari and Chrome */
  }
  
  #contact {
      position: absolute;
      width: 16%;
      background-color: transparent;
      border: 2px solid #FFF;
      margin-top: 12%;
      margin-left: 71%;
      height: 3em;
      color: #FFF;
      font-size: 1em;
      cursor: pointer;
      text-transform: uppercase;
      border-radius: 4px;
      animation: fadein 2s;
      -moz-animation: fadein 2s; /* Firefox */
      -webkit-animation: fadein 2s; /* Safari and Chrome */
  }
  
  #home:hover {
      color: #1dd2e2;
      border: 3px solid #18bdef;
      font-weight: bold;
  }
  
  #about:hover {
      color: #1dd2e2;
      border: 3px solid #18bdef;
      font-weight: bold;
  }
  
  #projects:hover {
      color: #1dd2e2;
      border: 3px solid #18bdef;
      font-weight: bold;
  }
  
  #contact:hover {
      color: #1dd2e2;
      border: 3px solid #18bdef;
      font-weight: bold;
  }
  
  @keyframes fadein {
      from {
          opacity:0;
      }
      to {
          opacity:1;
      }
  }
  @-webkit-keyframes fadein { /* Safari and Chrome */
      from {
          opacity:0;
      }
      to {
          opacity:1;
      }
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;!DOCTYPE html&gt;
  
  &lt;html&gt;
  &lt;head&gt;
      &lt;meta charset="UTF-8"&gt;
      &lt;meta name="viewport" content="width=device-width, initial-scale=1"&gt;
      
      &lt;title&gt;Home&lt;/title&gt;
      
      &lt;link href="https://fonts.googleapis.com/css?family=Source+Sans+Pro|Play" rel="stylesheet"&gt;
      
      &lt;link rel='stylesheet prefetch' href='http://maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css'&gt;
      &lt;link rel='stylesheet prefetch' href='http://rawgit.com/fralec/elegantShareJS/master/css/elegant.css'&gt;
  
      &lt;link rel="stylesheet" type="text/css" href="css/style.css"&gt;
  &lt;/head&gt;  
  &lt;body&gt;
      
      &lt;button id="home"&gt;Home&lt;/button&gt;
      &lt;button id="fadeContent" class="about"&gt;About&lt;/button&gt;
      &lt;button id="projects"&gt;Projects&lt;/button&gt;
      &lt;button id="contact"&gt;Contact&lt;/button&gt;
      
        &lt;div id="bodyContent"&gt;    
              &lt;h1&gt;Page&lt;/h1&gt;
              &lt;p&gt;Content&lt;/p&gt;      
        &lt;/div&gt;
      
      &lt;script src='http://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js'&gt;&lt;/script&gt;
      &lt;script src='http://cdnjs.cloudflare.com/ajax/libs/jqueryui/1.11.2/jquery-ui.min.js'&gt;&lt;/script&gt;
      &lt;script type="text/javascript" src="js/elegant.js"&gt;&lt;/script&gt;
      
      &lt;script type="text/javascript" src="js/transition.js"&gt;&lt;/script&gt;
      &lt;script type="text/javascript" src="js/index.js"&gt;&lt;/script&gt;
      &lt;script type="text/javascript" src="js/background.js"&gt;&lt;/script&gt;
  &lt;/body&gt;
  &lt;/html&gt;</code></pre>
  </div>
  </div>
  </p>