Uh oh, encountered another hiccup. It’s only working for single digits.
If the class is list-10, it’s putting the data id as “0” for 11 “1” etc.
I think it is because of this
n = identifier.substr(identifier.length-1);
I feel like I should be able to make it so that it takes the end of the identifier, minus the first five characters something along the lines of
n = identifier.substr(identifier.length-5%);
Do you have any idea what this kind of function is called, and can I do it in jQuery??
I’ve updated my original pen http://codepen.io/ald603/pen/NGqQgM
Thanks!