title: jQuery toggle() - adding and removing class for active element
body: <p>Currently, I am using this snippet:</p>
  
  <pre><code>$('.element-block').click(function(){
      $(this).siblings(".key-element").toggle();
  
      $('.background-area').removeClass("active_bg");
      $(this).parent('.background-area').addClass("active_bg");
  });
  </code></pre>
  
  <p>I have list of <code>DIV</code> elements. In this block, when I click on the <code>.element-block</code>, the <code>jQuery</code> function <strong>toggle()</strong> displays needed area, if I click again, <strong>toggle</strong> hide it and also I am adding the background color to this area.</p>
  
  <p>This is working well, for example: I click the A <code>.block-element</code> - data are appeared + background color changed. Then I click the B <code>.block-element</code> - data are appeared + background color changed. Cool.</p>
  
  <p>But if I click on the A <code>.block-element</code> - data are appeared + background color changed and then if I click again the A <code>.block-element</code> - data will be hidden, but the background color <strong>is not changed</strong>.</p>
  
  <p>How to fix this issue?</p>