If you markup stays the same as it is with a table behind the image
then you can use it like so:
$('#yourimage').prev('table').find('p:last');
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.
--
Brandon Aaron
On 12/11/06, Anaurag Gupta <[EMAIL PROTECTED]> wrote:
>
> > Felix Geisendörfer
> >
> > How about:
> > $("#yourimage").prev("p:last");
>
> Nope. Again, am trying to find the first occurance of P, working backwards
> from the Img.
>
> <body>
> <p>don't find me</p>
> <table><tr><td><p>don't find me</p></td><td><p>Find
> Me!</p></td></tr></table>
> <img id="yourimage" src="#" />
> <p>don't find me</p>
> </body>
>
> Thanks in advance to all who might be able to help.
>
> Anurag
> ________________________________
> Have a burning question? Go to Yahoo! Answers and get answers from real
> people who know.
> _______________________________________________
> jQuery mailing list
> [email protected]
> http://jquery.com/discuss/
>
>
>
_______________________________________________
jQuery mailing list
[email protected]
http://jquery.com/discuss/