dvp0008
23 Aug 2010, 01:42 PM
Hi all, I am trying to change a class of a div depending on in whichever page it is envoked.
like menu items are in header.php , which i am including( include php) in lot of pages, but depending on page i want to change color of a menu item.
I am confused what should be the If statement should be,
like ,
If( ){
document.getElementById("menu").className="active";
}
which in simple english might say :[ " if current page is some.php than change the class name of "menu" id to "active"]
Thanks.
like menu items are in header.php , which i am including( include php) in lot of pages, but depending on page i want to change color of a menu item.
I am confused what should be the If statement should be,
like ,
If( ){
document.getElementById("menu").className="active";
}
which in simple english might say :[ " if current page is some.php than change the class name of "menu" id to "active"]
Thanks.