show calculation in span

Posted on 2012-08-10
Last Modified: 2012-08-23

I want to show the calculation total in the span instead of the input box.
Question by:sevensnake77
    LVL 8

    Accepted Solution


    You have to use the .html('your content here') when populating an element (ie: <span></span>).  You can also use .text('your content here').  They each have their strong points and reasons for use.

    Also, I find I get weird results when I don't explicitly define my variable values as integers or floats when the values come from inputs.  Hence the parseFloat...
    LVL 9

    Author Closing Comment


    Featured Post

    What Should I Do With This Threat Intelligence?

    Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

    Join & Write a Comment

    It's a problem I'm sure many of you have faced in developing web applications.  You've got a form to add a new something - perhaps a customer or an item in a to-do list.  When the user clicks that link to add a new item, a new page loads, they fill …
    Introduction A frequently asked question goes something like this:  "I am running a long process in the background and I want to alert my client when the process finishes.  How can I send a message to the browser?"  Unfortunately, the short answer …
    The viewer will learn how to dynamically set the form action using jQuery.
    The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

    729 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    19 Experts available now in Live!

    Get 1:1 Help Now