I have three times in the format Minute: Seconds: Miliseconds, which I need to add together and get the total time.
for example, the one I used: 0: 31.110 + 0: 50.490 + 0: 32.797
which = 1: 54.397
so how to do it in javascript?
Here is the JS code
var sp1 = $('#table tr td:nth-child(2)').text()
var sp2 = $('#table tr td:nth-child(3)').text()
var sp3 = $('#table tr td:nth-child(4)').text()
var1 = sp1 + sp2 + sp3
$('td:nth-child(5)').html(var1);
I don’t know where to start, but I just came up with the code. I need output 1: 54.397 in the last td, but I get this 0: 31.1100: 50.4900: 32.797 shown in this example http://jsfiddle.net/q1kumbea/
source
share