how to add attr and class in jquery code example Example: addclass jquery $( "p" ).addClass( "selected highlight" );