Is there any method available to add IDs like there is for adding a class - addClass()?
ID is an attribute, you can set it with the attr function:
$(element).attr('id', 'newID');
I'm not sure what you mean about adding IDs since an element can only have one identifier and this identifier must be unique.
2.1m questions
2.1m answers
60 comments
57.0k users