http://docs.jquery.com/Selectors/attributeMultiple#attributeFilter1attri
buteFilter2attributeFilterN

$("input[type='button'][type='submit'][type='reset'].addClass("button");

Should work I believe. Untested.

AllexS

Hope this helps

-----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