Replace seconds with time format on multiple elements – Jquery
I'm struggling a little bit. I have multiple elements containing a time in seconds. <p><time class="replace_time">3.232151</time></p> <p><time class="replace_time">5.234151</time></p> ... jQuery(".replace_time").text(function(){ var d = jQuery(this).text(); var h = Math.floor(d / 3600); var m = Math.floor(d % 3600 / 60); var s…