Here what am trying to do is I created a unorderlist of 4 links. Link1 , link2 , link3 and link4. I created a new page for the unorderlist so that i can include it with php with include_once code in the main page. Actually what i want is when ever i clik any link its color be change but the remaining be unchanged. For eg. I click link1 . The page opens and remaining link color same as what i expected but when i click another link as link2 my previous link1 color and link2 color are same. I can't give a active class in each link because i include the unoderlist link in external page and include it with php include_once text. Any idea how can i complete it :(
Jump to Post
You can create an active class, it makes no difference if your list is held in an external file that you include into the main page.
Jump to Post
I'm not sure I'm understanding the problem but what I THINK you're saying is you want the link that belongs to the page you're on to look the same as your active class but the other links to remain looking like the default.
For that, in your include use …
All 5 Replies
We're a friendly, industry-focused community of 1.19 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.