I have a span element which holds a number such as 1,568.
When a button is clicked, I need that number to increment by 1. So 1,568 becomes 1,569.
If I just get the value and add + 1 to it, the value becomes 2:
("#artist-fan-count").text(parseInt($("#artist-fan-count").text()) + 1);
Should I try to remove the comma and then run the code above? If I do the line below, nothing happens -- which leads me to believe I'm doing it wrong. Shrug.
$("#artist-fan-count").text().replace(',', '');
Any tips?