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 702025
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T03:40:29+00:00 2026-05-14T03:40:29+00:00

I am trying to get a list of values within a div that I

  • 0

I am trying to get a list of values within a div that I will format later using the .each() method. They are input values which are hidden my html and jquery call looks like this.

<div id="container_0">
   <input type="hidden" id="check_data" value=10>
   <input type="hidden" id="check_data" value=20>
</div>

Jquery:

var list = $('#container_0 input#check_data');

$(list).each(
      function() {
           alert($(this).val());
       }
);

This however is not returning any values. Any help would be greatly appreciated.

  • 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-14T03:40:30+00:00Added an answer on May 14, 2026 at 3:40 am

    You can’t use the same ID multiple times, this is invalid HTML. When you do this, any results will be unpredictable, especially across browsers.

    This should work to alert the values though:

    $('#container_0 input').each(function() {
       alert($(this).val());
    });
    

    If you used a class, like this:

    <div id="container_0">
       <input type="hidden" class="check_data" value=10>
       <input type="hidden" class="check_data" value=20>
    </div>
    

    Then this would find only those inputs:

    $('#container_0 input.check_data').each(function() {
       alert($(this).val());
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to get a list of tmux sockets that are currently being
I'm trying to get a list in JavaScript (not using jQuery) of all the
I'm trying to get a list of comports that are currently in use to
I'm trying to get a List of Styles in the following xml file using
I'm trying to delete all the duplicate points within two array lists. Each list
I'm trying to write an each function that looks at each list item and
I am trying to get list of numbers from: numbers= 1,2 to: '1','2' I
Trying to get a list of all substrings currently I have a function but
I am trying to get the list of connected components in a graph with
I am trying to get a list of Files in a Folder from Google

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.