TeamPhotoshop
Reviews, updates and in depth guides to your favourite mobile games - AppGamer.com
Forum Home Latest Posts Search Help Subscribe

Show/Hide Layers trickery.

Page: 1 Reply
May 7th 2001#3113 Report
Member since: Mar 18th 2001
Posts: 6632
Hey fellows,

I'm having a bit of trouble with the show hide layers thing.

Here's the url, so you can see what I'm talking about.

http://www.undergradscentral.com/indextest.php

Mouseover the information link, then the layer pops up. Now when you move the mouse over About, then off of it, the layer disappears, which is fine, but if you try to move the mouse down to the next link in the menu, the layer disappears because it is moved off of that link. I know I can fix this by either using images, or by adding a delay to the hide function, but i want to try to do it without that so it will download quicker. Also, if I had the delay on there, the layers would overlap when you moved the mouse over all of the major nav links quickly. See what I mean? If you don't, please ask me to explain again, and I will try. Basically I just want to make it so that the layer stays there until the mouse is moved off of the layer, not just the text link.

Thanks.
Reply with Quote Reply
May 7th 2001#3115 Report
Member since: Apr 12th 2001
Posts: 27
Havn't tested it, but, couldn't you put an "onMouseOut:hide();" in the DIV-tag that hides the layer and just keep the "onMouseOver:show();" in the link that shows the layer...
Dan
Reply with Quote Reply
May 8th 2001#3123 Report
Member since: Mar 27th 2001
Posts: 2237
It might be a little bit overkill but I generally use it like:


HEAD:
[code]
funct~~n MM_showHideLayers() { //v3.0
var i,p,v,obj,args=MM_showHideLayers.arguments;
for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];
if (obj.style) { obj=obj.style; v=(v=='show')?'visible': (v='hide')?'hidden':v; }
obj.visibility=v; }
}
[/code]
BODY:
[code]
onMouseOver="MM_showHideLayers('layerA','','hide','LayerB','','hide','LayerC','','hide','layer1','','hide','layer2','','hide','layer3','','hide',layer4','','hide','layer5,'','show','layer6','','hide')">
[/code]
so it Hides all the other layers BUT the one you want to show....then use MouseOut to hide ALL of em.
Reply with Quote Reply
Page: 1 Back to top
Please login or register above to post in this forum