I am just trying to retrofit an active state into a static html menu. The menu has the following structure: -
You can get the current path with JavaScript using window.location.pathname. You can check with jQuery using something like:
$("#navbar a[href=" + window.location.pathname + "]").addClass('active');
This will add the active class to all anchors in #navbar that have the same href attribute as the current path. You may need to trim the leading slash.