Well, data is saved onto an indexed cache. You can't have an empty
string as a key, you need a name for it. If you don't provide a name
you'll get back the internal ID of the selected element.

// from jQuery source, data.js ln 27
return name ?
   jQuery.cache[ id ][ name ] :
   id;

Any reason you need to use an empty string as a key?

On Jun 29, 7:42 am, Steven Yang <kenshin...@gmail.com> wrote:
> Hi
> sorry for my bad example
>
> i did use something like what you said
> but something like $("#something").data('', mystuff);
>
> then $("#something").data('');

Reply via email to