> But I bet your markup is not going to stay the same. This is just going to
> require some interesting logic that will take lots of time to parse.
You'll
> have to climb the tree and if not a P, then check its children and repeat.

Another approach would be to leave some relation in the markup instead of
having to grope for it. 

        <body>
        <p>don't find me</p>
        <table><tr><td><p>don't find me</p></td>
           <td><p id="matches_yourimage">Find Me!</p></td></tr></table>
        <img id="yourimage" src="#" />
        <p>don't find me</p>
        </body>

It would help to know a bit more about how these two items are related,
because it seems odd to need something like this for arbitrary markup. The
best solution may be to simplify the markup rather than complicate the
expression. :)


_______________________________________________
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/

Reply via email to