how to add ID to a class in jquery code example Example: add id jquery $('element').attr('id', 'value');