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
Post a Comment