I promise that I've done my homework on this. It's a basic question, but I'm not terribly familiar with Jquery. Assume the following...
var cac = parseInt($("#currentAccess").val());
var acn = parseInt($("#addCapital").val());
var tn = (cac + acn);
How do I then take the variable tn, do a replace on it, and output it? This is an example that doesn't work...
$("#totalNeedG").append("<p>$" + tn.replace(/(\d)(?=(\d\d\d)+(?!\d))/g, "$1,") + "</p>");
Thanks for this simple help!