Supported CSS Selectors Documentation Page Error, I think

0 views
Skip to first unread message

RobShaver

unread,
Apr 29, 2009, 3:29:50 PM4/29/09
to DOMAssistant
HI all,

I'm brand new to DOMAssistant so I'm reading the docs. I ran into this
on this page:
http://www.domassistant.com/documentation/css-selectors.php
is says

p.info.error
Get all P elements with both a class name consisting of both
"info" and "item".

I'm still fumbling a bit with CSS so I'm not sure but shouldn't this
say:

p.info.error
Get all P elements with both a class name consisting of both
"info" and "error".

Peace,

Rob:-]

RobShaver

unread,
Apr 29, 2009, 3:40:19 PM4/29/09
to DOMAssistant
Question 2:

For this CSS selector p.info.error, would the HTML look like this:

<p class="info error">

If that's right then would this work too:

<p class="error info">

but these would not be returned:

<p class="error">Test 1</p>
<p class="info">Test 2</p>

So this selector is syntax is the logical AND of the two classes. Is
there any way to do an OR operation? I supose this would work:

var list = $(p.info) + $(p.error)

I think HTML examples would be very illuminating on this page.

Peace,

Rob:-]

Robert Nyman

unread,
Apr 29, 2009, 5:34:16 PM4/29/09
to domass...@googlegroups.com
Hi,

Looks just like a fault in the documentation. Cheng Hong, currently running the DOMAssistant project, can probably fix that soon.
Thanks for the heads up!

Best regards,
Robert

Robert Nyman

unread,
Apr 29, 2009, 5:36:16 PM4/29/09
to domass...@googlegroups.com
Hi,

You're absolutely right in how thing would work.
For the latter case, you could do something like this:

$("p.info, p.error");

The documentation could absolutely be clearer, but generally, using CSS selectors also takes for granted that the user has a basic CSS selector knowledge in general.


Best regards,
Robert
Reply all
Reply to author
Forward
0 new messages