General Community > WebsiteBaker Website Showcase
www.TheHost.co.za - hospitality business site
StefanRSA:
Thanks Guys...
I have a problem in my menu.... Its a combination of JS and CSS conflict... Its for the active page menu color...(?submenuheader=1)
Don't have this problem if I go only CSS but I want the glide down effect of the menu...
Stefek:
--- Quote from: StefanRSA on September 22, 2008, 03:43:04 PM ---... Its a combination of JS and CSS conflict...
--- End quote ---
Please explain the exact problem.
For me it look just fine. (FireFox 2 / Win XP)
Regards,
Stefek
StefanRSA:
The ?submenuheader=1 and ?submenuheader=0 works with my CSS to display the active page on the menu and also if the submenu should expand or not. This is the only way I can get the SUBMENUHEADER to also have a dif color when any sumenu page is selected.
The error shows in FF and IE in the background: Error: headers[expandedindex] is undefined
Source File: http://www.thehost.co.za/wb/pages/screen-shots.php?submenuheader=1
Line: 34
Stefek:
Now I see.
Something wrong with your JS.
Can't help - sorry.
I'm certain that sombody else will help you to fix this.
Regards,
Stefek
aldus:
As for a quick view: missing ";"
should be
--- Code: --- for (var i=0; i<expandedindices.length; i++){
var expandedindex=expandedindices[i]; //index of current expanded header index within array
headers[expandedindex].style.backgroundColor='#00B8FF';
headers[expandedindex].style.color='white';
}
--- End code ---
to avoid some unexpected results you should testing the results, e.g.
--- Code: --- for (var i=0; i<expandedindices.length; i++){
var expandedindex=expandedindices[i]; //index of current expanded header index within array
if (expandedindex) {
if (headers[expandedindex]) {
headers[expandedindex].style.backgroundColor='#00B8FF';
headers[expandedindex].style.color='white';
}
}
}
--- End code ---
sorry - untested yet ...
Regards
Aldus
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version