Jump to content

Need help with a simple PHP code , please help.

Recommended Posts

I want to update a class on a seperate navigation system.

can you help me?

the code is :

<ul class="mainmenu">
<li class="level1 item2 parent active" style="background: url('images/menu_item1_bg.png') no-repeat;"><a class="slider" href="index.html">Home</a></li>
<li class="level1 item4 parent" style="background: url('images/menu_item2_bg.png') no-repeat;"><a class="slider" href="/soft.html">Softwares</a></li>
<li class="level1 item6 parent" style="background: url('images/menu_item3_bg.png') no-repeat;"><a class="slider" href="/stats/downloads.php">CS Tools</a></li>
<li class="level1 item7 parent" style="background: url('images/menu_item4_bg.png') no-repeat;"><a class="slider" href="/forum/index.php">Forum</a></li>
<li class="level1 item8 parent" style="background: url('images/menu_item5_bg.png') no-repeat;"><a class="slider" href="">Contact Us</a></li>

Now as you can see there is a class called active on home's tab.

I want this class to be added on soft's tab when clicked , and to be removed from home's tab.

can you help me?

remember just updating of "active" is needed , everything remains same.

Link to comment
Share on other sites

First of all, this isn't PHP, it's HTML.

Second, "active" should be defined in a CSS and probably just defines the appearance of the active menu item.

For more help we need to know what generates this HTML, what script it is and so on.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    • No registered users viewing this page.

  • Create New...