title: get the parent id of an <li> tag on click jquery
body: <pre><code>&lt;ul&gt;
  &lt;li&gt;&lt;span&gt;
      &lt;ul&gt;
          &lt;li&gt;
              &lt;span class="parent overflow"&gt;Child&lt;a&gt;&lt;img src="../training/Test/Images/TDelete.png" class="iconTR" title="Delete Activity" width="13" id="1" height="13"&gt;&lt;/a&gt;&lt;/span&gt;
              &lt;ul&gt;
                  &lt;li&gt;
                      &lt;span class="parent overflow"&gt;grand Child&lt;a&gt;&lt;img src="../training/Test/Images/TDelete.png" class="iconTR" title="Delete Activity" id="2" width="13" height="13"&gt;&lt;/a&gt;&lt;/span&gt;
                  &lt;/li&gt;
              &lt;/ul&gt;
          &lt;/li&gt;
          &lt;li&gt;
              &lt;span class="parent overflow"&gt;Child&lt;a&gt;&lt;img src="../training/Test/Images/TDelete.png" class="iconTR" title="Delete Activity" id="3" width="13" height="13"&gt;&lt;/a&gt;&lt;/span&gt;
          &lt;/li&gt;
        &lt;/ul&gt;
    &lt;/span&gt;&lt;/li&gt;
  &lt;/ul&gt;
  </code></pre>
  
  <p>This is my code and I would like to get the <code>Id</code> of the immediate parent <code>li</code> tag on click of that image . That is when I click on the image of one <code>li</code> ,it should alert the <code>id</code> of the image in parent li.It would be very helpful if some you provide me the solution.</p>