no, I would do it exactly the way you said. I'd assume that this.kids
= count works... but I was wondering where does the value go, since
it's not really in the dom as a attribute, does it just get lost?

On 12/30/06, Matt Stith <[EMAIL PROTECTED]> wrote:
> Hrrrmmm, you mean that you do
>
> this.kids = count;
>
> then alert(this.kids) doesnt work?
>
> If so, make sure 'count' is being set correctly, i dont see why else the
> value would be lost
>
>
>  On 12/30/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?
> >
> > Just curious. You answer is perfect!
> >
> > On 12/30/06, Matt Stith <[EMAIL PROTECTED]> wrote:
> > > easy peasy:
> > >
> > > set the value:
> > >
> > > $(element).attr('kids',new_value);
> > >
> > > and to retrieve the value:
> > >
> > > $(element).attr('kids');
> > >
> > >
> > > On 12/30/06, Oliver Boermans <[EMAIL PROTECTED]> wrote:
> > > > Hi all
> > > >
> > > > What is the best way to attach and access my own properties to DOM
> > > > elements within the confines of jQuery?
> > > >
> > > > I'm attempting to write a script which iterates through a multi-level
> > > > multi-nested ordered list. Starting from the deepest level and working
> > > > up, I want to store an accumulated value on each element - based on
> > > > the number of children each ol / li contains.
> > > >
> > > > Storing the values within a .each() is working okay:
> > > >     this.kids = count;
> > > >
> > > > But retrieving these values is proving to be a problem - for me at
> > > > least... My JavaScript knowledge gets patchy outside basic DOM
> > > > manipulation.
> > > >
> > > > If this doesn't make sense please quiz me!
> > > >
> > > > Is there a better way to handle this kind of thing?
> > > >
> > > > Cheers
> > > > Ollie
> > > >
> > > > _______________________________________________
> > > > jQuery mailing list
> > > > [email protected]
> > > > http://jquery.com/discuss/
> > > >
> > >
> > >
> > > _______________________________________________
> > > jQuery mailing list
> > > [email protected]
> > > http://jquery.com/discuss/
> > >
> > >
> > >
> >
> >
> > --
> > Ⓙⓐⓚⓔ - יעקב   ʝǡǩȩ   ᎫᎪᏦᎬ
> > _______________________________________________
> > jQuery mailing list
> > [email protected]
> > http://jquery.com/discuss/
> >
>
>
> _______________________________________________
> jQuery mailing list
> [email protected]
> http://jquery.com/discuss/
>
>
>


-- 
Ⓙⓐⓚⓔ - יעקב   ʝǡǩȩ   ᎫᎪᏦᎬ
_______________________________________________
jQuery mailing list
[email protected]
http://jquery.com/discuss/

Reply via email to