jquery using the variables, target elements and use the removeClass() and addClass() methods code example
Example: addclass removeclass jquery
$( "p" ).addClass( "myClass yourClass" );
$( "p" ).addClass( "myClass yourClass" );