I like this idea too
How about prefix the data name with "data:" or something so that jquery
knows only to check the data if the prefix is there, so you don't slow other
selections down and allow for data names that are standard html attributes

Ant

-----Original Message-----
From: [email protected] [mailto:[EMAIL PROTECTED] On
Behalf Of Danny
Sent: 02 November 2008 05:28
To: jQuery Development
Subject: [jquery-dev] jQuery's Data functions


I was recently having a discussion with a fellow developer who was
writing code that set custom html attributes to various nodes to save
information that'd be required later when working with them.
I asked him why he wasn't using jquery's built-in support, Data for
storing that information in the nodes. He responded saying, he
woulnd't be able to use jquery's selectors to query against the dom.
$("div[custId=5]")  //etc.

That made me wonder, why isn't there some sort of support for querying
the values in the jquery.data from within a selector.  I'm aware I
could write a whole .filter(...) function but thats extrodinarily
wordy and defeat the purpose.

I was wondering what others thought of this, and how useful the data
functionality is to them in this regard.



--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"jQuery Development" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/jquery-dev?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to