[thelist] DOM: previousSibling and LI tags

VOLKAN ÖZÇELİK volkan.ozcelik at gmail.com
Fri Jan 20 08:57:05 CST 2006


> Phew, thats a lot to take in, haven't seen sweep() before.

it is possible that you haven't seen. it's a custom function, just
cooked and served :)

>In my scenario the LI elements actually have text elements so I don't think
> that would work for me

Nope, unless you don't intentionally ammend empty text nodes via DOM
Scripting, I suppose it will works as expected. Though I have not
tested the limiting edge situations.
So I do not know whether there are exceptions.

> by the way firefox
> and explorer handle them differently.

Because one of them has empty text nodes in its DOM structure, the
other doesn't have.
Sweeping the UL removes empty text nodes inside it and hence it may
affect how the LI's are rendered.

...

Anyway, Chris' solution is a good fit that throws the arrow right at the target.

OTOH, my proposition is like attacking the target with a rocket launcher.
(no targets, no problems isn't it :) )

Cheers,
--
Volkan Ozcelik
+>Yep! I'm blogging! : http://www.volkanozcelik.com/volkanozcelik/blog/
+> My projects/studies/trials/errors : http://www.sarmal.com/



More information about the thelist mailing list