Keep Active Menu Item Highlighted
Please note that this is now available as a plugin for easier installation. While you can use this document as a reference, the recommended method to add this functionality is through the plugin installation wizard. Learn more about plugins here.
When working with the Menu Component, you may decide to keep the active menu item highlighted, as shown in the GIF above.
One Easy Step
Add the following Code to the JavaScript tab of your layout or page where your menu is located.
$('.navbar .item').on("click", function() {
$('.navbar .item').removeClass('active');
$(this).addClass('active');
});
We'd love to hear your feedback.