I'll attempt to answer Jake's question because I know the 'why' is
often more useful than the 'how'.

I am laying out an ordered list as a family tree of sorts. This
involves setting the widths on the elements based on their
descendants. My current concept for the method requires me to break
the chain to repeat it over the whole multi-leveled list
(my family tree is rather large!).

Repeat below until every ol with no parent ol has 'kids' (or width) set

LI
------------------------------
find every li without 'kids' set in which every immediate child ol has
'kids' set
or
does not have an immediate child ol

compare value of 'kids' of each of its immediate child ol/s

set 'kids' on the parent li to the largest value
or if there is no immediate child ol set 'kids' to 1
        
set width of the li to 'kids' multiplied by variable

OL
------------------------------
find every ol (without 'kids' set) inside which every immediate child
li has 'kids' set

set 'kids' on the ol to the sum of every of its immediate child li 'kids' values

set width of the ol to kids multiplied by variable

------------------------------

When it comes to writing jQuery selectors to match this logic - I
expect it may be more practical to test for the widths I'm setting
rather than a custom property like 'kids''?

$("[EMAIL PROTECTED]'width']").parent().not("[EMAIL PROTECTED]'width']")

I resorted to the property as it can be a number rather than a width
value from which I would need to extract a number. e.g. '30em'

Seems I've still got a long way to go to get this working! All
pointers are welcome!

Cheers
Ollie 'out of his depth' Boermans

On 31/12/06, Ⓙⓐⓚⓔ <[EMAIL PROTECTED]> wrote:
> easy peasy and perfectly logical.... but what is Oliver's doing? is
> the attribute assigned to the object and then lost when the current
> $() is done? it would work from one line to the next, right?
_______________________________________________
jQuery mailing list
[email protected]
http://jquery.com/discuss/

Reply via email to