NUTRISHOP
// This function wraps the dollar sign and the cents in superscript tags function moneyFormatting(moneyAmount) { $lastTwo = $(moneyAmount).text().slice(-2); $dollarAmount = $(moneyAmount).text().slice(1,-2); $dollarSign = $(moneyAmount).text().slice(0,1); console.log($lastTwo); console.log($dollarAmount); $(moneyAmount).html("" + $dollarSign + "" + "" + $dollarAmount + "" + "" + $lastTwo + ""); } // This calls the function on the Cancel Payment Amount div $(document).ready(function(){ moneyFormatting("#cancel-payment-amount"); });