title: Change parent element style with jQuery
body: <p>I have next html setup:</p>
  
  <pre><code>&lt;div class="one"&gt;
      &lt;div class="two"&gt;
          &lt;a href="#" class="three"&gt;Click&lt;/a&gt;
      &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>And I want to change background color for element with class <strong><em>.one</em></strong> when I click on element <strong><em>.three</em></strong> with jQuery.</p>
  
  <p>This is what I was trying to use:</p>
  
  <pre><code>$(function(){
      $('.three')(function(){
          $(this).parent().parent().css('backgroundColor', 'red');
      })
  });
  </code></pre>
  
  <p>Here is a fiddle example: <a href="https://jsfiddle.net/Munja/a7unbs2p/" rel="noreferrer">https://jsfiddle.net/Munja/a7unbs2p/</a></p>
  
  <p>I was searching for solution here on SO but wasn't able to find it fast enough (probably I didn't look good enough :/).</p>
  
  <p>Thank you.</p>