From dfd5b1dbe7475f0e5ff72437a75b5bd761df1c22 Mon Sep 17 00:00:00 2001 From: dave Date: Fri, 29 Aug 2014 08:42:08 -0700 Subject: [PATCH] Divide minutes correctly --- static/js/app.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/static/js/app.js b/static/js/app.js index aac90d7..412350c 100644 --- a/static/js/app.js +++ b/static/js/app.js @@ -168,7 +168,7 @@ var behaviors = { }).on("slide", function(){ newTime = $(".time-holder .player-slider").slider('getValue').val(); hours = Math.floor(newTime/60/60) - minutes = Math.floor(newTime/60) + minutes = Math.floor(newTime/60)%60 seconds = Math.floor(newTime-(minutes*60)) $(".timeshow").html((hours>0?hours+":":"")+minutes+":"+(seconds<10?"0":"")+seconds) }); @@ -186,7 +186,7 @@ var behaviors = { // And update the time newTime = event.jPlayer.status.currentTime; hours = Math.floor(newTime/60/60) - minutes = Math.floor(newTime/60) + minutes = Math.floor(newTime/60)%60 seconds = Math.floor(newTime-(minutes*60)) $(".timeshow").html((hours>0?hours+":":"")+minutes+":"+(seconds<10?"0":"")+seconds) }