Hmm, I didn't know CSS allowed escaping characters. This works on
firefox:
#tom.cat { selects id="tom" class="cat" }
#tom\.cat { selects id="tom.cat" }
Anyway, i find that confusing. Add the fact that things like ▒☃╋☎★☄☂
are valid IDs/class names, put some dots in the middle, and then
you've got
D does not make illegal markup.
JK
-Original Message-
From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Dave Methvin
Sent: Friday, October 17, 2008 12:54 PM
To: jQuery (English)
Subject: [jQuery] Re: dot separated id
> It's not useful to claim that the specs
> $("tom.cat") selects
$("#tom.cat") selects
> $("tom\\.cat") selects
$("#tom\\.cat") selects
> It's not useful to claim that the specs are faulty. Until they change, dots
> in IDs are legal and valid.
Re-read Ricardo's answer. You are free to use dots in your ids if you
want. He is saying that by permitting a dot in an id string, the specs
allow a confusing ambiguity that has to be reso
t useful to claim that the specs are faulty. Until they change,
> dots
> in IDs are legal and valid.
>
> JK
>
> -Original Message-
> From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On
> Behalf Of ricardobeat
> Sent: Friday, October 17, 2008 10:21 AM
&
bject: [jQuery] Re: dot separated id
Yeah, that's a fault in the specs. XHTML specs also allow dots in IDs:
'only strings matching the pattern [A-Za-z][A-Za-z0-9:_.-]* should be
used.' - http://www.w3.org/TR/xhtml1/#C_8
But that causes problems for CSS too:
#tom.cat { which one
Yeah, that's a fault in the specs. XHTML specs also allow dots in IDs:
'only strings matching the pattern [A-Za-z][A-Za-z0-9:_.-]* should be
used.' - http://www.w3.org/TR/xhtml1/#C_8
But that causes problems for CSS too:
#tom.cat { which one are you referring to? }
- ricardo
On Oct 16, 7:
Specs at link pointed out says:
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 (".").
Aren't dots and periods the same?
-
double backslashes are the short term fix, but remember for the long
term that dots are illegal in ID's and will cause your page to not
validate.
see http://www.w3.org/TR/html401/types.html#type-name for reference.
-micah
On Oct 16, 11:02 am, andrazk <[EMAIL PROTECTED]> wrote:
> Hi!
>
> We're
See:
http://docs.jquery.com/Frequently_Asked_Questions#How_do_I_select_an_element_that_has_weird_characters_in_its_ID.3F
On Oct 16, 2:02 pm, andrazk <[EMAIL PROTECTED]> wrote:
> Hi!
>
> We're working with a java workframe that creates element ID-s
> separated with dots and thus we have problem
10 matches
Mail list logo