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