I think it's just mis-documented...or I'm misunderstanding the
documentation format.  From what I can tell, the docs say that
jQuery.data( name, value ) should return *value* (i.e., the second
argument), when it actually returns the jQuery object.  The latter is
more useful, as George's example illustrates. If the docs were
correct, George's example above wouldn't work, since the addClass
method would be expected as a member of the object '{ first: 16, last:
"pizza!" }' that was added as the value.

On Dec 10, 12:50 pm, "Richard D. Worth" <[EMAIL PROTECTED]> wrote:
> Do you have some sample code showing the problem?
>
> - Richard
>
> On Tue, Dec 9, 2008 at 5:12 PM, mgl <[EMAIL PROTECTED]> wrote:
>
> > The docs athttp://docs.jquery.com/Coresay that 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