title: How to add class on clicked element but removed from other elements by closest() method
body: <p>How to add <code>.active</code> class nearer to .table-cell-right class when click on .line class but at same time remove .active class from all other places  by using closest() method in jquery.</p>
  
  <pre><code>   &lt;div class="line"&gt;
       &lt;div class="table-cell"&gt;
         &lt;span class="zky-points"&gt;1 ZKY &lt;/span&gt;&lt;span class="sp-symbol"&gt;℗&lt;/span&gt;
       &lt;/div&gt;
       &lt;div class="table-cell-right"&gt;
         &lt;span class="euro"&gt;€&lt;/span&gt; 1ZKY
         &lt;button name="credit" class="btn btn-primary buy-credit" type="button"&gt;Buy Credit&lt;div class="ripple-wrapper"&gt;&lt;/div&gt;&lt;/button&gt;
       &lt;/div&gt;
      &lt;/div&gt;
  
      &lt;div class="line"&gt;
       &lt;div class="table-cell"&gt;
         &lt;span class="zky-points"&gt;1 ZKY &lt;/span&gt;&lt;span class="sp-symbol"&gt;℗&lt;/span&gt;
       &lt;/div&gt;
       &lt;div class="table-cell-right"&gt;
         &lt;span class="euro"&gt;€&lt;/span&gt; 1ZKY
         &lt;button name="credit" class="btn btn-primary buy-credit" type="button"&gt;Buy Credit&lt;div class="ripple-wrapper"&gt;&lt;/div&gt;&lt;/button&gt;
       &lt;/div&gt;
      &lt;/div&gt;
  </code></pre>