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

The Archive Base Latest Questions

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

When i do $(#sum).html(parseFloat(2.2).toFixed(2)); In firefox i get: <b xmlns=http://www.w3.org/1999/xhtml>2.20</b> in $(#sum).html() I want

  • 0

When i do

$("#sum").html(parseFloat("2.2").toFixed(2));

In firefox i get:

"<b xmlns="http://www.w3.org/1999/xhtml">2.20</b>"

in

 $("#sum").html()

I want to calculate (and display correct) with this div (#sum) what is not possible, because i get the float value with

sum = parseFloat($("#summe").html());

and it returns NaN.

This works with Chrome. Is there any way to get this to work with firefox?

  • 1 1 Answer
  • 1 View
  • 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:08:15+00:00Added an answer on May 20, 2026 at 5:08 am

    Use .text() in both cases rather than .html(), since you are only setting text.

    // Set
    $("#sum").text(parseFloat("2.2").toFixed(2));
    
    // Get (don't forget `var` if you're declaring here)
    sum = parseFloat($("#summe").text());
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm working on this website http://www.eluminatecreative.com/new/index.html and where it says sum'r fling I need
The os.walk documentation ( http://docs.python.org/library/os.html ? highlight=os.walk#os.walk), says I can skip traversing unwanted directories
I would like to get the total sum of values having class addition1::: HTML
I need to categorize this html page http://gnats.netbsd.org/summary/year/2012-perf.html , I need to make a
I added a delay but it is not working... <div id=sum></div>рублей​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​​ $('#sum').html('3000').delay(3000).html('5000'); http://jsfiddle.net/Jv8g6/ Why
Trying to calculate sum of checked tr's. var totalqt=0; totalqt=totalqt + $(this).closest(tr).find(#qt).text(); It gets
I have a list in HTML that holds the attributes data-answer and data-sum. The
HTML Code Snippet: <fieldset id=o-bs-sum-buginfo> <label for=o-bs-sum-bug-ErrorPrefix>Error Prefix</label> <input type=text id=o-bs-sum-bug-ErrorPrefix name=ErrorPrefix value= />
I want to add some HTML elements that have the same class name. So,
I am trying to get sum of rows of my table: td1 val =

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.