I'm having trouble getting the replace function to work. Here's my code:
var divid = $(this).parents(".list-radio").attr('id').match(/\d/g);
divid = divid.replace(/\,/g,"");
The first line brings back a set of digits separated by commas (e.g. "2,2,3") and I was hoping the second line would remove the commas, but it just fails.
Any ideas?
Thanks in advance,
Ash