On the page I linked above, under the section titled "Data Cache":

> data( name, value )   Returns: Any
> Stores the value in the named spot and also returns the value.

What do you make of that?

On Dec 10, 11:33 am, George <[EMAIL PROTECTED]> wrote:
> I do not see where it says that.
> .data(name,value)
> puts a value in.
>
> Usually any JQuery functions returns JQuery chain of objects.
>
> So something like that can be done
> $("div").data("test", { first: 16, last: "pizza!" }).addClass('red');
>
> The $('div').data('test') will return you the value.
>
> George
>
> On Dec 9, 5:12 pm, mgl <[EMAIL PROTECTED]> wrote:
>
> > The docs athttp://docs.jquery.com/Coresaythat jQuery.data
> > (name,value) should return the value, but instead it seems to be
> > returning jQuery.  Is this what is supposed to happen?

Reply via email to