Divide minutes correctly
This commit is contained in:
parent
8ca315b65f
commit
dfd5b1dbe7
|
@ -168,7 +168,7 @@ var behaviors = {
|
||||||
}).on("slide", function(){
|
}).on("slide", function(){
|
||||||
newTime = $(".time-holder .player-slider").slider('getValue').val();
|
newTime = $(".time-holder .player-slider").slider('getValue').val();
|
||||||
hours = Math.floor(newTime/60/60)
|
hours = Math.floor(newTime/60/60)
|
||||||
minutes = Math.floor(newTime/60)
|
minutes = Math.floor(newTime/60)%60
|
||||||
seconds = Math.floor(newTime-(minutes*60))
|
seconds = Math.floor(newTime-(minutes*60))
|
||||||
$(".timeshow").html((hours>0?hours+":":"")+minutes+":"+(seconds<10?"0":"")+seconds)
|
$(".timeshow").html((hours>0?hours+":":"")+minutes+":"+(seconds<10?"0":"")+seconds)
|
||||||
});
|
});
|
||||||
|
@ -186,7 +186,7 @@ var behaviors = {
|
||||||
// And update the time
|
// And update the time
|
||||||
newTime = event.jPlayer.status.currentTime;
|
newTime = event.jPlayer.status.currentTime;
|
||||||
hours = Math.floor(newTime/60/60)
|
hours = Math.floor(newTime/60/60)
|
||||||
minutes = Math.floor(newTime/60)
|
minutes = Math.floor(newTime/60)%60
|
||||||
seconds = Math.floor(newTime-(minutes*60))
|
seconds = Math.floor(newTime-(minutes*60))
|
||||||
$(".timeshow").html((hours>0?hours+":":"")+minutes+":"+(seconds<10?"0":"")+seconds)
|
$(".timeshow").html((hours>0?hours+":":"")+minutes+":"+(seconds<10?"0":"")+seconds)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue