ID's need to be unique...
ID's need to be unique...
-DW [Deadweight]
Resolving your thread: First Post: => EDIT => Lower right: => GO ADVANCED => Top Advance Editor drop down: => PREFIX:Resolved
-DW [Deadweight]
Resolving your thread: First Post: => EDIT => Lower right: => GO ADVANCED => Top Advance Editor drop down: => PREFIX:Resolved
This is what I'm entering and it still doesn't work. What am I doing wrong?
Code:<script> music.ontimeupdate = function(){ $('#timeline').html('width', music.currentTime / music.duration * 100 + '%'); $('#tracktime').html(Math.ceil(music.currentTime) + ' / ' + Math.ceil(music.duration)); } </script>
Should beCode:$('#timeline').html('width', music.currentTime / music.duration * 100 + '%');
Code:$('#timeline').css('width', music.currentTime / music.duration * 100 + '%');
-DW [Deadweight]
Resolving your thread: First Post: => EDIT => Lower right: => GO ADVANCED => Top Advance Editor drop down: => PREFIX:Resolved
This follolwing still displays in seconds. Plus, it changes the timeline as in the attached screenshot.
Code:<script> music.ontimeupdate = function(){ $('#timeline').css('width', music.currentTime / music.duration * 100 + '%'); $('#tracktime').html(Math.ceil(music.currentTime) + ' / ' + Math.ceil(music.duration)); } </script>
What are you trying to do? Are you trying to convert the seconds to minutes and seconds? If so then you shouldnt need my help with that. That is math calculation related. You just need to take
Remove the other line and convert the Math.ceil into its own vars and calculate seconds and minutes. Hopefully, you know that there are 60 seconds in a min.Code:$('#tracktime').html(Math.ceil(music.currentTime) + ' / ' + Math.ceil(music.duration));
An example:
Code:var tsecs = 232; var rsecs = tsecs % 60; var rmins = Math.floor(tsecs/60);
-DW [Deadweight]
Resolving your thread: First Post: => EDIT => Lower right: => GO ADVANCED => Top Advance Editor drop down: => PREFIX:Resolved
Bookmarks