title: Selected div highlight in Html Page
body: <p>When i click Test 1,Test 2 or Test 3, clicked div will highlight from other two divs. I want to do is, when div get highlight, other areas of the page must dark ( opacity reduce) Then clicked div only highlight from full page.
  Anyone help me to get this done please..</p>
  
  <p>Working sample here
  <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() {
    $('.section').click(function() {
      $('.section2').removeClass('section2');
      $(this).addClass('section2');
    });
  });</code></pre>
  <pre class="snippet-code-css lang-css prettyprint-override"><code>.container {
    width: 400px;
    margin: 0 auto;
  }
  
  .section {
    height: 50px;
    margin: 10px;
    background-color: red;
    color: white;
    box-shadow: 3px 3px 15px rgba(102, 102, 102, 0);
    border: 1px solid rgba(0, 0, 0, 0);
    opacity: .3;
  }
  
  .section2 {
    height: 50px;
    background-color: green;
    color: white;
    margin: 10px;
    opacity: 1 !important;
    box-shadow: 3px 3px 15px #666;
    border: 1px solid #7d7d7d;
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"&gt;&lt;/script&gt;
  &lt;div class="container"&gt;
    &lt;header&gt;This is header of the sample &lt;/header&gt;
    &lt;br/&gt;
    &lt;div class="div-list"&gt;
      &lt;div class="section"&gt;
        &lt;h2&gt;Test 1&lt;/h2&gt;
      &lt;/div&gt;
      &lt;div class="section"&gt;
        &lt;h2&gt;Test 2&lt;/h2&gt;
      &lt;/div&gt;
      &lt;div class="section"&gt;
        &lt;h2&gt;Test 3&lt;/h2&gt;
      &lt;/div&gt;
    &lt;/div&gt;
    &lt;br/&gt;
    &lt;footer&gt;
      &lt;h3&gt;This is footer of the sample &lt;/h3&gt;
    &lt;/footer&gt;
  &lt;/div&gt;</code></pre>
  </div>
  </div>
  </p>