how can i get the number from a div tag\'s id?
example:
how can i get the 1 and store it in
// replace all non-digits with nothing alert($('div').attr("id").replace(/\D/g,''));
If you like, you can just grab the numbers at the end:
// alert($('div').attr("id").match(/\d+$/)); // alerts "555"