getting parent index with jquery -


I know there is another question with the answer to my question, though a solution that was asked to be new It does not work to me

Then I have something like this:

  & 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 () {warning ($ (this) .Parent (). Index ());});   

I want to retrieve Lee's pointer, though the solution is not working for me.

Edit:

Right my real code is div.thumb within children:

    

I did not think it would make any difference because the video thumb is being clicked. I'm getting -1 for anyone. Thumb is clicked ?????

Yes it works, please show some code.

Have you put jQuery inside the () function?

  $ (document) .ready (function () {$ ("ul li div.thumb") .live ("click", function () {warning ($ (this). Parent (.) Index ());});});    

Comments

Popular posts from this blog

Python SQLAlchemy:AttributeError: Neither 'Column' object nor 'Comparator' object has an attribute 'schema' -

java - How not to audit a join table and related entities using Hibernate Envers? -

mongodb - CakePHP paginator ignoring order, but only for certain values -