![]() |
DHTML Menu Editing
I made this little DHTML menu with a menu builder tool I have and I was wondering how to change something. Go ahead and take a look at the menu here: www.team696.org I want the menu to be the dark gray color (like when you mouseover) all the time in the cell for the page you are on. Like if you are on the Contact page, I want only the Contact cell in the menu to be dark gray and the rest to be light gray. Could someone please view my source code and tell me what to change? I have the same code for the menu on all the pages of the site. Thanks.
|
add this to around line 60-65:
Code:
<script type='text/javascript'>Code:
c=FontSubLowColor; |
Wow, thanks for the quick help. I got it working http://team696.org/menutest.html Now, I just need one more thing, for the text to be white in that dark gray cell. Any help?
|
sure; around line 520-527 (in your new modified example):
Code:
c=FontSubLowColor; |
I just got it by myself actually by just tinkering around a bit before I saw your post. I did the exact same thing you just did. Thanks for your help.:)
|
I have a similar question. If you are making a menu, like the one on that website, how would you make the hover, color change effect? It looks like you could use the onMouseOver event, but how would you get it to change back after the mouse leaves it? Is there an event that is the opposite of onMouseOver? If not, then how do you do it?
|
yes, the opposite of onmouseover is onmouseout, its used just like onmouseover is
|
There are a lot of online tutorials regarding this aspect of Javascript, especially in the area of DHTML menus. I personally try not to use the things (it's all about pure CSS menus, which are structured way better and make up for just about all of JS's shortcomings), but I've read some pretty informative and interesting stuff about JS and they include extensive coverage of event handlers like onMouseOut. I'd recommend reading some of that if you're into Javascript.
|
Quote:
|
Just FYI, that robocards link above has a picture that takes forever to load. Maybe it's because it's 3520x2400 :eek: :D
|
Quote:
|
Thanks for all that information, but I think I can figure out how to use onMouseOut. Just one quick question to avoid going through all the tutorials, Does the onMouseOver and onMouseOut have to go on every td tag in the table?
|
Quote:
|
I thought that return flase only applies to onClicks used with hyperlniks, so that it doesn't jump back to the top of the page.
|
Quote:
|
| All times are GMT -5. The time now is 01:40. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi