I’m developing a small app, when a checkbox is checked it’s id value is added to a hidden field, when unchecked, it’s id has to be removed from the hiddenfield value. I know how to add, but don’t know how to remove. It’s like say there is a string strValue=”abcde”; how do I remove ‘c’ from the strValue using jQuery? Thank you.
Share
You can use replace.
Live Demo
I would suggest two things, looking at jQuerys .Data() method for storing values, and at the very least making your list delimited by something such as a comma.