[jQuery] setting attbitues

[jQuery] setting attbitues


I discovered that if I want to set the class for an object, this is
not the code
$('#' + id).setAttribute("class", "myClass");
What is the correct syntax? Thanks, - Dave