drbigfresh Posted April 18, 2007 Share Posted April 18, 2007 I have a list item menu like below, and I am trying to find some JavaScript so that on each page I can dynamically change (I guess when the page loads) the id of the <li> from 'itemone' or 'itemtwo' to 'active' ...Can anyone point me in the right direction.... Thanks! <div id="navcontainer"> <ul id="navlist"> <li id="itemone"><a href="#" id="current">Item one</a></li> <li id="itemtwo"><a href="#">Item two</a></li> <li id="itemthree"><a href="#">Item three</a></li> </ul> </div> Quote Link to comment Share on other sites More sharing options...
nogray Posted April 18, 2007 Share Posted April 18, 2007 just use something like this document.getElementById('itemone').id = "active"; Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.