title: Active all data id and # when Onclick
body: <p>Problem going wrong is when i <strong>Onclick for "c-1" btn in div=mark-container,</strong> the same id will be active in the same time,but the another button which also is <strong>"c-1" in the div = second-mark</strong> , wouldn't active together,how to make" it to be active together?</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>$('.c-1').click(function() {
    var tab = $(this).attr('data-id');
  
    $('.c-1').removeClass('active');
    $(".c-1-details").removeClass('active');
  
    $(this).addClass('active');
    $("[id='" + tab + "']").addClass('active');
  });</code></pre>
  <pre class="snippet-code-css lang-css prettyprint-override"><code>.c-1-details {
    display: none;
  }
  
  .c-1-details.active {
    display: block;
  }
  
  .active {
    color: green;
    font-weight: bold;
  }</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="mark-container"&gt;
    &lt;button class="c-1 active" data-id="tab-1"&gt;
         &lt;p&gt;for 1 btn&lt;/p&gt; 
        &lt;/button&gt;
  
    &lt;button class="c-1" data-id="tab-2"&gt;
         &lt;p&gt;for 2 btn&lt;/p&gt;
        &lt;/button&gt;
  
    &lt;div class="c-1-details active" id="tab-1"&gt;
      &lt;p&gt;for 1 details&lt;/p&gt;
    &lt;/div&gt;
  
    &lt;div class="c-1-details" id="tab-2"&gt;
      &lt;p&gt;for 2 details&lt;/p&gt;
    &lt;/div&gt;
  &lt;/div&gt;
  
  &lt;div class="second-mark"&gt;
    &lt;ul&gt;
      &lt;button class="c-1 active" data-id="tab-1"&gt;current btn 1&lt;/button&gt;
  
      &lt;button class="c-1" data-id="tab-2"&gt;current btn2&lt;/button&gt;
    &lt;/ul&gt;
  
    &lt;div class="c-1-details active" id="tab-1"&gt;
      display content 1
    &lt;/div&gt;
  
    &lt;div class="c-1-details" id="tab-2"&gt;
      display content 2
    &lt;/div&gt;
  &lt;/div&gt;</code></pre>
  </div>
  </div>
  </p>