Jump to content

Changing ID of LI...


drbigfresh

Recommended Posts

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>

Link to comment
https://forums.phpfreaks.com/topic/47500-changing-id-of-li/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.