With jQuery, I’m doing some math to calculate a price. The math works, but I want to put a dollar sign in front of it, and when I try adding "$" +
into the code, the math stops working correctly. How can I get the value of #totalprice to include the dollar sign?
$('#totalprice').val("$" + $('#qty1').val() * $('#price1').val() + $('#qty2').val() * $('#price2').val();
1