title: Find the parents parent element using jquery
body: <p>I have the HTML as follows. what i need is when someone clicks on the span element i want to find its parents parent element check some conditions. i used prev() method but it gives me only the near parent(<em>parent2 here</em>)</p>
  
  <pre><code>&lt;div class="container"&gt;
      &lt;div class="contain"&gt;
          &lt;div id="parent1"&gt;
              &lt;div class="parent2"&gt;
                  &lt;span&gt; Click here&lt;/span&gt;
              &lt;/div&gt;
          &lt;/div&gt;
      &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>var currentComponent = $(event.target).prev(); //<em>here i get parent2</em></p>
  
  <p>How can i find the parents parent element(in this case <em>parent2</em>). i am not very familiar with jquery so any help would be appreciated.</p>