[jQuery] Re: ID naming conventions and $.scrollTo()

2009-09-18 Thread lanxiazhi
--
What would be another
way of clearly identifying an object without the id?

you can specify almost any attribute to  identify a object.
like this:
div identify='!...@#$%^+_)(*'!...@#$%^+_)(*/div

and use
$([identif...@#$%^+_)(*])
to fetch the element!


[jQuery] Re: ID naming conventions and $.scrollTo()

2009-09-17 Thread Richard D. Worth
On Thu, Sep 17, 2009 at 11:28 AM, Steffan A. Cline stef...@hldns.comwrote:


 I was peaking around on the W3C site to see if I could find a clear
 definition of which characters are allowed within an ID.


http://www.w3.org/TR/html4/types.html#h-6.2

ID and NAME tokens must begin with a letter ([A-Za-z]) and may be followed
by any number of letters, digits ([0-9]), hyphens (-), underscores (_),
colons (:), and periods (.).




 The problem is that I have a series of divs that have id=aq-1234 cd-456
 etc. I have no real control over the - in the name. What would be another
 way of clearly identifying an object without the id?

 td id=aq-1234 is what I have now. I've not used the rel=xxx that I
 see
 some people use. Would that be acceptable? Clearly $(#aq-1234) is not.

 Any suggestions?


See

http://docs.jquery.com/Frequently_Asked_Questions#How_do_I_select_an_element_that_has_weird_characters_in_its_ID.3F

http://docs.jquery.com/Frequently_Asked_Questions#How_do_I_select_an_element_that_has_weird_characters_in_its_ID.3F-
Richard


[jQuery] Re: ID naming conventions and $.scrollTo()

2009-09-17 Thread elubin

Clearly $(#aq-1234) is not

WHY?