This is just JavaScript, not jQuery.
To remove the first appearance of the work "checkbox _":
var updatedString = originalString.replace("checkbox_", "");
Or, if you know that it will always be in the form of "checkbox_n" , where n is a digit,
var updatedString = originalString.substring(9);
... which discards the first nine characters from the string.
In any case, you will get a string. If you want a number, you can use parseInt :
var updatedString = parseInt(originalString.replace("checkbox_", ""), 10);
... or just put a + in front of it to trigger an automatic cast (but note that in this case both decimal and hexadecimal strings will be processed):
var updatedString = +originalString.replace("checkbox_", "");
Notice that I wrote updatedString = originalString.blah(...); but, of course, you can replace your link, for example, "originalString = originalString.blah (...);`.
More details:
Tj crowder
source share