This code generates a comma separated string to provide a list of ids to the query string of another page, but there is an extra comma at the end of the string. How can I re
Here is a simple method:
var str = '1,2,3,4,5,6,'; strclean = str+'#'; strclean = $.trim(strclean.replace(/,#/g, '')); strclean = $.trim(str.replace(/#/g, ''));