Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3980094
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T05:14:59+00:00 2026-05-20T05:14:59+00:00

Can I Pass an array into jquery attr for one property, such as follow

  • 0

Can I Pass an array into jquery attr for one property, such as follow

$("th[id={x,y}]")

it look like “where in” condination at SQL. My wants such as it, $(“th[id={x,y}]”) is th’s id equal one of these? I want to ask it! Do you use any where-in condition in sql.. My wants like it.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-20T05:15:00+00:00Added an answer on May 20, 2026 at 5:15 am

    [EDIT]
    the question has been modified to clarify what he wants, so I’ve removed the inapplicable parts of my answer…

    JQuery (and CSS) allows you to use multiple selectors together:

    For example:

    $('[id=x], [id=y], [id=z]')
    

    …will select all elements in your page with either of your possible id values.

    Alternatively, if you only want to find them within $(this), you would use the find() method:

    $(this).find('[id=x], [id=y], [id=z]')
    

    Hope that answers you’re question.

    Depending on the values you’re searching for, you may also be interested in more advanced attribute selectors. For example, if your x, y and z options all begin with the same string, you could use the attribute prefix selector:

    $('[id|=prefix]')
    

    or if they all contain a particular word:

    $('[id~=word]')
    

    there are a number of possible options; that should give you a start, but see the JQuery manual for more information: http://api.jquery.com/category/selectors/

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

You can pass special strings into jQuery's Datepicker class setDate() method like +7 which
Can i pass the entire POST array into a function and handle it within
My current code looks like the following. How can I pass my array to
How can I pass an array of filenames into the following method: public static
How can I pass an array of structs by reference in C? As an
In C can I pass a multidimensional array to a function as a single
From a method, I can pass a struct which contains an array of integers,
I have an array which contains around 50-200 hyperlinks. How can I pass this
Using logparser you can pass on parameters to the query you'd like to run
I am trying to seperate values in an array so i can pass them

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.