I am need to add to add the .toFixed(2) value into this jQuery below but not sure where to place it.
right now it displays something like this when the calculation is done:
You are $10.020000000000003 away from Free Shipping!
jQuery(document).ready(function(){
if(jQuery("div.dynamicMiniCart dd.subtotal").length>0) {
var subtotal = jQuery("div.dynamicMiniCart dd.subtotal")[0].textContent;
var subTotalArr = subtotal.split("$");
if(subTotalArr.length>1){
var spendMore = 45 - Number(subTotalArr[1]);
if(spendMore >0)
jQuery("#show_total").text("You are $"+spendMore+" away from Free Shipping!");
else
jQuery("#show_total").text("Made in the USA!");
}
}
})
;