Last active
August 20, 2018 13:19
-
-
Save veritstudio/f6f0392faa3be179e8ed7ca88d0008f1 to your computer and use it in GitHub Desktop.
Convert decimal to fraction
This file contains hidden or 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
| jQuery.each(jQuery('td'), function (index, value) { | |
| if (jQuery(value).text().match(/\.|,5/g) !== null) { | |
| jQuery(value).html( | |
| jQuery(value).text().replace(/\.|,5/g, "") + | |
| "<i class=\"fraction\">½</i>" | |
| ); | |
| } | |
| }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment