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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T22:31:11+00:00 2026-06-10T22:31:11+00:00

I have 5 divs. <div class=wx-temp>89 <sup>°F</sup></div> <div class=wx-temp>91 <sup>°F</sup></div> <div class=wx-temp>87 <sup>°F</sup></div> <div

  • 0

I have 5 divs.

<div class="wx-temp">89 <sup>°F</sup></div>
<div class="wx-temp">91 <sup>°F</sup></div>
<div class="wx-temp">87 <sup>°F</sup></div>
<div class="wx-temp">90 <sup>°F</sup></div>
<div class="wx-temp">89 <sup>°F</sup></div>

I get them like this.

var degress = $("div.wx-temp").text();

I want to append celcius values after the sup elements.

When I get the degress in .each function it parse the text like this:

{8,9,°,F,9,1,°,F.........} 

I want to get only integers like this:

{89,91,87,90,89}

How can I do this? THANKS.

  • 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-10T22:31:13+00:00Added an answer on June 10, 2026 at 10:31 pm

    If you’re iterating over .text, that’s what you’ll get – an iteration over each character in the string. You want to iterate over the entire list of elements:

    $("div.wx-temp").each(function() {
        var degFahrenheit = parseInt($(this).text(), 10);
        var degCelcius = customConversionHere(degFahrenheit);
        // append degCelcius to $(this)
    });
    

    Strictly, $(this).text() above will yield "89 °F", rather than "89", but parseInt will take care of that.

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

Sidebar

Related Questions

I have 3 divs inside 1 div like so.. <div class=contentImages> <div id=slideshow> <img
I have 8 divs. Each div has the class 'pre-loader'. In addition to thas
I want to display some div's in a wrap. The div have same class
I have two divs: <div class=outer> <div class=inner>Example</div> </div> And I have a jQuery
I have two divs: <div class=dialog large></div> and <div class=dialog></div> I have to remove
I have some divs: <div class=A>Target</div> <div class=A B>NotMyTarget</div> <div class=A C>NotMyTarget</div> <div class=A
So I have 3 divs contained inside a containing div like such: <div id=contain>
I have two divs: one draggable and one droppable <div id=draggable class=block runat=server> </div>
i have 3 divs with the same class. <div id=qq1 class=cl>sentence</div> <div id=qq2 class=cl>sentence</div>
I have two divs as follows: <div class=car-service id=browse-all-button> <p>CAR SERVICE</p> <span>56 Race Ramps</span>

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.