getting parent index with jquery
<p>I know there is another question with an answer to my question, however one solution that was said to be newer does not work for me.</p>

<p>so I have something like: </p>

<pre><code>&lt;ul&gt;
 &lt;li&gt;&lt;div class="thumb"&gt;&lt;/div&gt;&lt;/li&gt;
 &lt;li&gt;&lt;div class="thumb"&gt;&lt;/div&gt;&lt;/li&gt;
 &lt;li&gt;&lt;div class="thumb"&gt;&lt;/div&gt;&lt;/li&gt;
&lt;/ul&gt;


$("ul li div.thumb").live("click",function(){

alert($(this).parent().index());

});
</code></pre>

<p>I want to retrieve the index of the li, however the solution is not working for me.</p>

<p>EDIT:</p>

<p>Ok my actual code has children within div.thumb:</p>

<pre><code>&lt;ul&gt;
    &lt;li&gt;&lt;div class="thumb"&gt;&lt;div class="inner"&gt;3&lt;/div&gt;&lt;/div&gt;&lt;/li&gt;
 &lt;li&gt;&lt;div class="thumb"&gt;&lt;div class="inner"&gt;3&lt;/div&gt;&lt;/div&gt;&lt;/li&gt;
 &lt;li&gt;&lt;div class="thumb"&gt;&lt;div class="inner"&gt;3&lt;/div&gt;&lt;/div&gt;&lt;/li&gt;
&lt;/ul&gt;
</code></pre>

<p>I didn't think it would matter since div thumb is being clicked. I'm getting -1  for any .thumb clicked
    ​</p>
