Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

show calculation in span

Posted on 2012-08-10
2
Medium Priority
?
257 Views
Last Modified: 2012-08-23
http://jsfiddle.net/B67sS/89/

I want to show the calculation total in the span instead of the input box.
0
Comment
Question by:Seven price
2 Comments
 
LVL 8

Accepted Solution

by:
soupBoy earned 2000 total points
ID: 38281222
http://jsfiddle.net/slim81/B67sS/100/

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...
0
 
LVL 9

Author Closing Comment

by:Seven price
ID: 38326364
tks
0

Featured Post

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

DOM Attributes and Properties treatment with jQuery 1.6 by Ivo Stoykov jQuery (http://jquery.com/) 1.6 introduces .prop() (http://api.jquery.com/prop/) and .removeProp() (http://api.jquery.com/removeProp/) methods which allow modifying or removi…
Introduction If you're like most people, you have occasionally made a typographical error when you're entering information into an online form.  And to your consternation, the browser remembers the error, and offers to autocomplete your future entr…
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn the basics of jQuery, including how to invoke it on a web page. 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.: (CODE)
Suggested Courses
Course of the Month20 days, 17 hours left to enroll

810 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