Oh, I tested the script I posted earlier again on FF3 and IE7 and it
works fine. Only if you call it with a non-existant element's selector
as a parameter it will loop infinitel - it's rough as I said :)

On Nov 11, 8:15 pm, Sam H <[EMAIL PROTECTED]> wrote:
> Sorry - but your script causes an infinite loop for some reason.  And
> jQuery's "nextUntil" doesn't work either, it doesn't survive past the
> end of the sibling tree.
>
> I need my function to go PAST the end of the list of siblings, up
> through parents, etc., all the way to the end of the document if need
> be.
>
> Example:
>
> <body>
> <div id="main">Text here - <div id="bury">buried</div> <div
> id="lastKid">ends here</div></div> <!-- end main -->
> <div id="gotme">got me!</div>
> </body>
>
> $('.bury').crawl('.gotme') should actually return the "gotme" DIV.
> next(), nextAll(), and nextUntil() will all stop right after the
> "lastKid" DIV.

Reply via email to