jquery add class in text function code example
Example 1: add class jquery
$("#my_id").attr("class", "my_new_class_name");
Example 2: jquery addclass
$( "p" ).removeClass( "myClass noClass" ).addClass( "yourClass" );
$("#my_id").attr("class", "my_new_class_name");
$( "p" ).removeClass( "myClass noClass" ).addClass( "yourClass" );