If I have the following element:
<div id="ITEM22"></div>
I can get the id like this:
$(this).attr('id');
But how can I get just the numeric part of this if, i.e. 22 ?
EDIT: ITEM is always a prefix.
var thenumber22 = $(this).attr('id').match(/(\d+)/)[1]
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With