And if so, how do you select on with jQuery? I.e., $("#a b") looks for all <b> nodes within the node with id=a.
$("#a b")
<b>
id=a
According to the HTML 4.0 specification for basic types:
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 (".").
And even if spaces were valid, an id attribute with spaces would be interpreted by jQuery as an ancestor descendant selector with the current selector syntax.
2.1m questions
2.1m answers
60 comments
57.0k users