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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T18:00:57+00:00 2026-05-30T18:00:57+00:00

I have a code as you can see below. I am trying to find

  • 0

I have a code as you can see below. I am trying to find the html() of each span item under a certain div
for example: the div #hello should return :”this is” and “a nice” and “block of spans”
html as follow:

<div id="hello">
<span id="info1"> this is</span>
<span id="info2">a nice</span>
<span id="info3"> block of spans</span>
</div>

<div id="bye">
<span id="info4"> more</span>
<span id="info5"> spans</span>
</div>

and this is the jquery I tried:

<script>
function values() {
var poo=$('div#hello').find('span').html();
alert(poo);

    }
</script>

the issue with the code I have is that it only does an alert for the first value “this is”
I need it to do an alert for all of the values. any suggestions ? thank you

  • 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-30T18:00:59+00:00Added an answer on May 30, 2026 at 6:00 pm

    You can use each like this to get html of each span element:

    function values() {
      $('#hello > span').each(function(){
         alert($(this).html());
      });
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have this code below. As you can see I am passing two variables
I have some really funky code. As you can see from the code below
I have a table defined (see code snippet below). How can I add a
I have some code that is using SyncEnumerator. As you can see here ,
i have written the following code: As you can see there is a for
I have code that uses jquery.slideup and jquery.slidedown How can i know that div
Despite trying lots of things (see below), I can't get rid of the Bytes
Following on from this question I now have code that can attach to a
I have a subclass of UITableViewController. I have code that can add/remove a UISearchBar
I have problem compilin this code..can anyone tell whats wrong with the syntax CREATE

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.