addclass removeclass code example
Example 1: addclass removeclass jquery
$( "p" ).addClass( "myClass yourClass" );
Example 2: add and remove class in jquery
$('#toggle li').on('click', function () {
$(this).toggleClass('open')
});
$( "p" ).addClass( "myClass yourClass" );
$('#toggle li').on('click', function () {
$(this).toggleClass('open')
});