Last active
April 6, 2020 17:28
-
-
Save patrickfuller/cb1c7945345bd0a9d5bf6438f1cb8949 to your computer and use it in GitHub Desktop.
Converts inches to mm on McMaster's website.
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
$('.dx').each((i, el) => { | |
let val = $(el).html(); | |
if (val.slice(-1) === '"') { | |
$(el).html((parseFloat(val.slice(0, -1)) * 25.4).toFixed(1) + ' mm'); | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment