Is there any method available to add IDs like there is for adding a class - addClass()?
do you mean a method?
$('div.foo').attr('id', 'foo123');
Just be careful that you don't set multiple elements to the same ID.