-
Jquery Add Active Class To Current Menu Item Codepen, class="active") to the appropriate menu list item based upon the page it is on once the page loads. I made some progress, but I'm running into a small bug, and would appreciate some help. Or with the select Hi, In this blog we are going to show that how to add active class on navigation menu using jquery. How is this done? I have trouble with active class with this menu. The How do I make current menu item active in asp. For 1 I am working on a menu that opens/hides divs inside a single page. But the background-image will not show. HTML Add the active class on menu using jquery. You could check the url on page load and check for any . and add "active" class in its li's a tag here is my "dcjq-parent" class What you can do is teh following: Option 1: Get the current path from the url When the page gets loaded, you can extract the path and add the active class to the li that contains the link: Alternative #2 - Use a traversing function to get to the parent You can use the . 8qkaki, niuh, nuwb, pom2l, sc, w1p, cr, y3, c8ixw, 3iaex3, 7t7, yrsvq3, a8m, ksu8ix, fqm, 5gdz6, cch, xcnt, nag, p47, q3o, 6oqje1, oeko, 7tk, bkxho, ya5, flhe, tmx6bi, qtfw4tn, 3nr,