hope this makes some sense....
I have a menu and the items are set dynamically using a loop and I bring in the sidebar containing the menu with an include.
So each of the <li> in the menu have the id of the menu name which is also the page title.
I'm trying to set the class to 'active' for whichever menu item we are on.
The menu item corresponding to my "Used Inventory" page is:
<li id="Used Inventory">Used Inventory</li> (which is also the page title tag)
So below I'm trying to figure out how to set a class of 'active' to that <li> based off the title tag.
Obviously I'm failing :(
Any idea how to get this done?
$('#' + $(document).attr('title')).addClass('active');