how can i get the number from a div tag's id?
example:
<div id="button1"></div>
how can i get the 1 and store it in a variable?
var id = $("div").attr('id').replace(/button/, '');
2.1m questions
2.1m answers
60 comments
57.0k users