I want to go deep, so if I had html > body > div > div > p > b > i ...
and I clicked on p, I would get the index number for p.
Then problem with $("*", document.body).click(function () {}); is that
you click on every element, not just the top most one. It is similar
to stabbing through 10 sheets
I'm not quite following this. If you have a DOM element (i.e. "this" in your
click function), and you want to do something with it later, simply save a
reference to the element itself. Why do you want to use an index into a
jQuery result array?
Also, in a page with many elements, those "*" select
On Jun 30, 10:59 am, Dan <[EMAIL PROTECTED]> wrote:
> But when I click, it adds the red text color to all parents too. I
> changed the code too print the index number and it appends several
> index numbers to the element I click and the parents.
>
> [...]
>
> So, how do I get only the top most ele
3 matches
Mail list logo