jquery getting listitem id from its child id
<pre><code>&lt;li id="l"&gt;&lt;a href="#"&gt;&lt;img id="i" /&gt;&lt;/a&gt;&lt;/li&gt;
</code></pre>

<p>I have image id and i want listitem id , i know one way </p>

<pre><code>$("#i").parent().parent().attr("id");
</code></pre>

<p>Is there any better way than this?</p>
