How to take particular ascendant of an child using jquery.?
<p>Hai i am having the following html list.</p>

<pre><code>&lt;ol id="queryList"&gt;
  &lt;li id="queryLi1"&gt;
     &lt;span class="contentParent"&gt;First Level&lt;/span&gt;
      &lt;ul class="content"&gt;
        &lt;li id="innerList594" class="content"&gt;
             Second Level
              &lt;ul class="content"&gt;
                    &lt;li&gt;
                        Third Level
                        &lt;textarea id="text1" cols="3" style="width: 250px"&gt;&lt;/textarea&gt;
                        &lt;input id="button1" type="button"  value="Save" &gt;
                   &lt;/li&gt;
             &lt;/ul&gt;
        &lt;/li&gt;
      &lt;/ul&gt;
    &lt;/li&gt;
    &lt;li id="queryLi2"&gt;
      &lt;span class="contentParent"&gt;First Level&lt;/span&gt;
      &lt;ul class="content"&gt;
        &lt;li id="innerList525" class="content"&gt;
              Second Level
              &lt;ul class="content"&gt;
                    &lt;li&gt;
                        Third Level
                        &lt;textarea id="text2" cols="3" style="width: 250px"&gt;&lt;/textarea&gt;
                        &lt;input id="button2" type="button" value="Save"&gt;
                   &lt;/li&gt;
             &lt;/ul&gt;
        &lt;/li&gt;
      &lt;/ul&gt;
    &lt;/li&gt;
      .
      .
      .(etc.,)
</code></pre>

<p>In this list when i click on <code>Save button1</code> i want to take its ascendant <code>&lt;li id="queryLi1"&gt;&lt;span class="contentParent"&gt;</code>
element. Same as for all the list items ..For example if i click <code>Save button2</code> i want to take <code>&lt;li id="queryLi2"&gt;&lt;span class="contentParent"&gt;</code>.. </p>

<p>I tried like this </p>

<pre><code> var ascende = $(this).closest('.contentParent');
</code></pre>

<p>but i didnt get it.. Can any one help me..</p>
