I have a side menu that when the user click changes the color of a selected item in the menu atravens of a javascript code, however when an update happens on the screen the class is removed. Would anyone have any tips on how to leave the selected color after screen refresh?
I wanted you to have the same behavior as sbadmim link
var selector2 = '.menu-section-list li';
$(selector2).on('click', function () {
console.log("s");
$(selector2).removeClass('active');
$(this).addClass('active');
});