title: Javascript - add class to element, remove from siblings
body: <p>Code is very basic (you can get the idea when you look at it, no need to explain), somehow it doesn't work... can anyone please tell me what am i doing wrong?</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>$("ul li").click(function() {
    $(this).addClass('cell-selected')
      .parent().siblings().find('.cell-selected').removeClass('cell-selected');
  });</code></pre>
  <pre class="snippet-code-css lang-css prettyprint-override"><code>.cell-selected {
    color: #fff;
    background: #5b2200;
    border-color: #ce5209;
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"&gt;&lt;/script&gt;
  &lt;ul&gt;
    &lt;li class="cell-selected"&gt;&lt;a&gt;First&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a&gt;Second&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a&gt;Third&lt;/a&gt;&lt;/li&gt;
  &lt;/ul&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p><a href="https://jsfiddle.net/dantini23/vt46qucq/" rel="nofollow noreferrer">fiddle</a></p>