var text_id=$(this).attr('id').replace('slide_label', ''); var next_text_id=text_id+1; alert(next_text_id)