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

  • SEARCH
  • Home
  • 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 8815305
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T04:20:35+00:00 2026-06-14T04:20:35+00:00

I have a rails application where I get the following response when I use

  • 0

I have a rails application where I get the following response when I use jQuery get function. I have to get all div elements with id='users_belonging_to_project'.

As you can see there are multiple divs with same id. I want to get the whole html() for those ids.

As it is returned from response, I used $(data).find("div[id^='users_belonging_to_project']") which is not giving the array of divs.

<div id='i_1' class='clicked'>A</div>
<div id='users_belonging_to_project' class='demo-container'>
    <div id='2' class='user_clicked'>
        tm@gmail.com
    </div>
</div>
<div id='i_2' class='clicked'>B</div>
<div id='users_belonging_to_project' class='demo-container'>
    <div id='2' class='user_clicked'>
        tm@gmail.com
    </div>
</div>
<div id='i_3' class='clicked'>dsf</div>
<div id='users_belonging_to_project' class='demo-container'>
    <div id='3' class='user_clicked'>
        tm1@gmail.com
    </div>
</div>
<div id='i_4' class='clicked'>fd</div>
<div id='users_belonging_to_project' class='demo-container'>
    <div id='2' class='user_clicked'>
        tm@gmail.com
    </div>
    <div id='3' class='user_clicked'>
        tm1@gmail.com
    </div>
</div>
  • 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-06-14T04:20:37+00:00Added an answer on June 14, 2026 at 4:20 am

    The id of an element is supposed to be unique, thus getElementById returns one element and jQuery is itself not looking for more than one element with the same id. Change this from id-s to some other attribute and select by that attribute. You can use an HTML5 attribute like data-identifier or some other data-* attribute that you like.

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

Sidebar

Related Questions

I have a simple rails 2.3.4 application I am trying to get running with
I have a Rails 2.3 application. I currently have the following validations in my
In my rails 3.1 application, I have Lists, which have many tasks. All the
I have the following in my Rails 3 controllers/application.rb (which I'm trying to write
I have an almost-new Rails 3.1.0 application, and rspec can't find my examples. duncan@duncan-notebook:~/myapp$
I have Rails 3 application (running Rails RC1), and I have the following controller:
I have two rails applications. In the first application i have the following method
I have a Rails 3 application and I am using the following code to
I have Rails application with mounted Engine. #{main_app}/config/routes.rb mount CommentIt::Engine => /talk, :as =>
I have rails application running in linode server .Some guy is continuously spamming (writing

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.