On Jan 6, 2010, at 10:13 AM, Richard Collette wrote:

The jQuery documentation states that it uses a combination of both CSS
and XPath selectors.

Does that mean that I should be able to select attributes using the
syntax:

[attName=Val1 or attName=val2]

since XPath criteria allow OR's like this?

If not, exactly what parts of XPath are supported?



Earlier versions of jQuery supported a mix of CSS 1-3 and a subset of XPath, but the XPath selector syntax support has been removed for quite some time. Can you please point me to the URL in the documentation where it says that both are supported so I can correct it?

To answer your question, this should work:

$('[attName=Val1], [attName=val2]')

I'd put something (like a tag name) before each of those attribute selectors, though. For example:
$('input[attName=Val1], input[attName=val2]')


--Karl

____________
Karl Swedberg
www.englishrules.com
www.learningjquery.com

Reply via email to