Ignore what I just said... according to the docs it will only match if
all the attributes are the same, not based on an "or".

AllexS

-----Original Message-----
From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of nguyenq
Sent: Wednesday, October 22, 2008 12:41 PM
To: jQuery (English)
Subject: [jQuery] Combining selectors


I need help in this compound selector problem. I have the following
jQuery statements, which are working:

    $("[EMAIL PROTECTED]'button']").addClass("button");
    $("[EMAIL PROTECTED]'submit']").addClass("button");
    $("[EMAIL PROTECTED]'reset']").addClass("button");

I want to combine them into a single statement, such as:

    $("[EMAIL PROTECTED]'button' or @type='submit' or
@type='reset']").addClass("button");

or

    $("[EMAIL PROTECTED]'button'] or [EMAIL PROTECTED]'submit'] or
[EMAIL PROTECTED]'reset']").addClass("button");

similar to the Boolean OR that XPATH expresssion allows, but it does
not work. What is the proper syntax, if the combining is possible?

Reply via email to