Skip to main content

javascript/css navigation menu not hiding nested ul



I have a navigation made and it has sub-levels, which works fine. However, I now want to add ANOTHER level to a sub-level, so that I can choose Lookup-->Webinar-->By Date





The way I have this set up, the extra level is not hidden by default. It is only supposed to show when the word "Webinar" gets hovered over. Can someone help?







<div id="menuwrapper">

<ul id="p7menubar">

<li><a href="#" class="trigger">Lookup</a>

<ul>

<li><a href="/ProductLookup.aspx">Product</a></li>

<li><a href="/CategoryLookup.aspx">Category</a></li>

<li><a href="#" class="subtrigger">Webinar</a>

<ul>

<li><a href="/WebinarLookupByDate.aspx">By Date</a></li>

<li><a href="/WebinarLookupByName.aspx">By Name</a></li>

<li><a href="/WebinarLookupByCategory.aspx">By Category</a></li>

</ul>

</li><!--end subtrigger-->

</ul>

</li><!-- end lookup trigger -->

</ul><!--end p7menubar-->

<br class="clearit" />

</div><!--end menuwrapper-->





/*

------------------------------------

PVII Menu CSS Express Drop-Down Menu

by Project Seven Development

www.projectseven.com

------------------------------------

*/



body {

font-family: "Trebuchet MS", Arial, sans-serif;

font-size: 100%;

background-color: #FFFFFF;

margin: 24px 0;

padding: 0; }



#menuwrapper {

border-bottom: 1px solid #EAEAEA;

background-color: #909090;

width: 100%;

background-image: url(/images/loginStatusBkgd.png);

background-repeat: repeat-x;

height: 29px;

font-size: 10pt; }



.clearit {

clear: both;

height: 0;

line-height: 0.0;

font-size: 0; }





#p7menubar, #p7menubar ul {

padding: 0;

margin: 0;

list-style: none;

font-family: Arial, Helvetica, sans-serif;

padding-right: 10px;

padding-left: 10px;

font-size: 10pt; }



#p7menubar a {

display: block;

text-decoration: none;

padding: 7px 10px 5px 10px;

border-right: 1px solid #EAEAEA;

font-size: 10pt;

color: #909090; }



#p7menubar a.trigger {

padding: 7px 16px 5px 10px;

background-image: url(/images/p7PM_dark_south.gif);

background-repeat: no-repeat;

background-position: right center;}



#p7menubar a.subtrigger{

padding: 2px 0px 5px 16px;

background-image: url(/images/p7PM_dark_south.gif);

background-repeat: no-repeat;

background-position: right center; }



#p7menubar li {

float: left;

width: 9em; }



#p7menubar li ul, #p7menubar ul li {

width: 12em; }



#p7menubar ul li a {

color: #565656;

border-right: 0;

padding: 3px 12px 3px 16px; }



#p7menubar li ul {

position: absolute;

display: none;

background-color: #FFFFFF;

border: 1px solid #EAEAEA; }





#p7menubar li:hover a, #p7menubar a:focus,

#p7menubar a:active, #p7menubar li.p7hvr a {

background-color: #365F91;

color: White;

text-decoration: none; }



#p7menubar li:hover ul, #p7menubar li.p7hvr ul {

display: block; }



#p7menubar li:hover ul a, #p7menubar li.p7hvr ul a {

background-color: #365F91;

color: #909090;

text-decoration: none;

background-color: transparent; }



#p7menubar ul a:hover {

background-color: #365F91!important;

color: White!important; }



#p7menubar li {width: auto; }









I don't know if the javascript will help, but I threw it in too.

*/

function P7_ExpMenu(){ //v1.1.0.2 by PVII-www.projectseven.com

if(navigator.appVersion.indexOf("MSIE")==-1){return;}

var i,k,g,lg,r=/\s*p7hvr/,nn='',c,cs='p7hvr',bv='p7menubar';

for(i=0;i<10;i++){g=document.getElementById(bv+nn);if(g){

lg=g.getElementsByTagName("LI");if(lg){for(k=0;k<lg.length;k++){

lg[k].onmouseover=function(){c=this.className;cl=(c)?c+' '+cs:cs;

this.className=cl;};lg[k].onmouseout=function(){c=this.className;

this.className=(c)?c.replace(r,''):'';};}}}nn=i+1;}}




Comments

Popular posts from this blog

[韓日関係] 首相含む大幅な内閣改造の可能性…早ければ来月10日ごろ=韓国

div not scrolling properly with slimScroll plugin

I am using the slimScroll plugin for jQuery by Piotr Rochala Which is a great plugin for nice scrollbars on most browsers but I am stuck because I am using it for a chat box and whenever the user appends new text to the boxit does scroll using the .scrollTop() method however the plugin's scrollbar doesnt scroll with it and when the user wants to look though the chat history it will start scrolling from near the top. I have made a quick demo of my situation http://jsfiddle.net/DY9CT/2/ Does anyone know how to solve this problem?

Why does this javascript based printing cause Safari to refresh the page?

The page I am working on has a javascript function executed to print parts of the page. For some reason, printing in Safari, causes the window to somehow update. I say somehow, because it does not really refresh as in reload the page, but rather it starts the "rendering" of the page from start, i.e. scroll to top, flash animations start from 0, and so forth. The effect is reproduced by this fiddle: http://jsfiddle.net/fYmnB/ Clicking the print button and finishing or cancelling a print in Safari causes the screen to "go white" for a sec, which in my real website manifests itself as something "like" a reload. While running print button with, let's say, Firefox, just opens and closes the print dialogue without affecting the fiddle page in any way. Is there something with my way of calling the browsers print method that causes this, or how can it be explained - and preferably, avoided? P.S.: On my real site the same occurs with Chrome. In the ex