Problem using menu system with lightbox.js

Having problems with DHTML Menu? There is usually somebody here who knows the answer.
Post Reply
Stew
Beginner
Beginner
Posts: 4
Joined: Wed Apr 04, 2007 2:04 pm

Problem using menu system with lightbox.js

Post by Stew »

Hi,
When I click on an image to view larger image, I use some js called lightbox, I'm sure you'll have come across it on many sites.

The problem is that while the calling page is 'greyed out' , the menu system is still visible and active.

Has anyone combined the 2 successfully?
User avatar
Andy
Milonic
Milonic
Posts: 3308
Joined: Sun May 19, 2002 8:23 pm
Location: Menu Developer
Contact:

Post by Andy »

Hi,

Yes, you can ensure that the main menu sits under the "greyed area" with Prototype and Lightbox by adding a zindex property to your main menu.

Here's a sample main menu:

Code: Select all

with(milonic=new menuname("Main Menu")){
alwaysvisible=1;
left=170;
orientation="horizontal";
style=menuStyle;
top=120;
zindex=80;
aI("text=Home;url=http://milonic.com/;");
aI("showmenu=Milonic;text=Milonic;");
aI("showmenu=Partners;text=Partners;");
aI("showmenu=Links;text=Links;");
aI("showmenu=MyMilonic;text=My Milonic;");
}
I think Lightbox sets its zIndex to 100 so if you force the menus zindex to be 80 it should sit high enough to work but low enough to sit under lightboxes PNG image.

HTH,
Andy
Stew
Beginner
Beginner
Posts: 4
Joined: Wed Apr 04, 2007 2:04 pm

Post by Stew »

brilliant, worked a treat.
Thanks very much
:D
Post Reply