I’m sure this is possible with JavaScript, but I couldn’t find exactly what I’m looking for by searching and my scripting skills are very poor.
I have 3 sliders on a page, which output their value to 3 separate divs (with ids cost, length, income). I would like to have a formula that takes the content of each div and gives a final result, e.g. result = (income-cost)*length in a separate div. Ideally, the result would update as each individual slider moved, but maybe a ‘calculate’ button would be easier?
Here is a link to the page in question
consider you have three divs as such as below. Check the code
Please check the fiddle link http://jsfiddle.net/ZKTeu/