That looks pretty simple. Is that PHP Code? The box says it is.
I think that's pretty close. I'm going to try to explain it without using code. I think that may help.
Say I have 7 pages. On each of those 7 pages, I have 7 nav tabs at the top that go to each one of those pages.
Each page would have a div id in it according to what page it is:
Example: page1.html has a div id="page1"
Let's use page1 as an example.
Page1 has all 7 tab images as the 'off' images initially.
Example: page1button_off.jpg, page2button_off.jpg, etc.
I'd like a script that looks to see (when any page loads) if it is page1, page2, page3, page4 , page5, page6 or page7.
Let's say the script sees that it's page2. It would then find the page2 id,
and use that as a basis to know which tab image to change to the 'on'
image, in this case: page2button_off.jpg to page2button_on.jpg
That's about the best I can explain it.
I haven't seen anything like this, but imagine how valuable it would be! wouldn't have to go into every html page and change one of the buttons to the on or active state! The site I am trying to do this for has a lot of subnav pages under one of those 7 main tabs. So I am basically trying to avoid having to go into each one and change the top tab image to on.
This is what I have been looking for but with images
I have been searching for this script for hours. Finally thought I found my solution. Only to see that the script does not define for images and I am not sure how to change it to reference images only? Please advise as I feel I am very close to the answer finally. And you were right, this would be extremely helpful to many people I am sure as I know this is something I have wanted to do for a long time. Thank you.