Last active
March 21, 2016 18:09
-
-
Save jtwalters/3a1f6754bf123765f585 to your computer and use it in GitHub Desktop.
Parse DOM element's h:mm:ss to seconds and replace (in place).
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Parse duration value from table cell, replacing as seconds... | |
$table.find('td:nth-child(7)').each(function () { | |
var value = this.innerHTML.trim(), | |
seconds = moment.duration(value).asSeconds(); | |
this.innerHTML = seconds; | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment