SyntaxFix
Write A Post
Hire A Developer
Questions
do you mean a method?
$('div.foo').attr('id', 'foo123');
Just be careful that you don't set multiple elements to the same ID.