Who can tell me does sizzle support namespace in selector? If it supports, who can give me some examples, I can't find such information in API docs.
Thanks!
Who can tell me does sizzle support namespace in selector? If it supports, who can give me some examples, I can't find such information in API docs.
Thanks!
No, Sizzle does not support the namespace selector.
The CSS selector for namespaces is namespace|
. This selector matches a span in any namespace (including the default namespace): *|span
.
This selector works with jQuery in modern browsers: jsfiddle.net/U7my4
Modern browsers support document.querySelectorAll()
natively, so jQuery uses that by default. Sizzle is the fallback selector engine that is used for older browsers. Basically, we're talking about IE7 and IE6, and these are hardly used any more outside of China. By loading that jsFiddle's frame page in IE7-mode, you can force jQuery to use sizzle. And it fails with an error message:
Syntax error, unrecognized expression: *|span