why not remove class in jquery code example
Example: add and remove class in jquery
$('#toggle li').on('click', function () {
$(this).toggleClass('open')
});
$('#toggle li').on('click', function () {
$(this).toggleClass('open')
});