if(stopwatch >= track[song].duration)
track[song].duration
finds the duration of a soundcloud track.
I am looking to create a stopwatch function that starts counting milliseconds when you click on the swap
ID stopwatch
so that when the function has been clicked for a certain amount of time the if function will do something. In my case replace an image. And also that the function will reset it itself when clicked again.
so like stopwatch
= current time
- clicked time
How can I set up the clicked time
current time
= new Date().getTime();
? And is this in milliseconds?
$('#swap').click(function()...