title: Remove class not working with reference to parent element
body: <p>I want to remove class with reference to parent as below snippet. Why I am not able to do it</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>$('div').click(function(){
      $('#parent div').removeClass('red');
      $(this).addClass('red');
  });</code></pre>
  <pre class="snippet-code-css lang-css prettyprint-override"><code>.red{color:red}</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;script src="https://ajax.googleapis.com/ajax/libs/jquery/1.4.1/jquery.min.js"&gt;&lt;/script&gt;
  &lt;div id="parent"&gt;
      &lt;div class="red"&gt;A&lt;/div&gt;
      &lt;div class="red"&gt;B&lt;/div&gt;
      &lt;div class="red"&gt;C&lt;/div&gt;
      &lt;div class="red"&gt;D&lt;/div&gt;
      &lt;div class="red"&gt;E&lt;/div&gt;
      &lt;div class="red"&gt;F&lt;/div&gt;
  &lt;div&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>PS: I want modifying html to be the last option.</p>