473,399 Members | 4,192 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,399 software developers and data experts.

flyout error in javascript

I created a flyout menu using css and called the css class in javascript.The problem is, onmouseover the menu is highlighting and the pop up is coming under the menu when we move the mouse down towards the link the highlighting is not displaying. Please help me in how to get this resolved.
Expand|Select|Wrap|Line Numbers
  1. my JS code : 
  2. var num, current = false;
  3.     $('#site_navigation > li.items > a')
  4.         .hoverIntent(function(e){
  5.                     //Clear out the open subnavs
  6.                     $('.subnav').css('display','none');
  7.                     var $$ = $(this);
  8.                     num = parseInt(($$.parent().attr('id')).substr(4,1));        
  9.                     num -= 2;
  10.                     var sel = '#subnav-' + num;
  11.  
  12. /*============================TRACE=========================
  13.                     var o = {};
  14.                     o.dir             ='IN';
  15.                     o.target         = e.target;
  16.                     o.relatedTarget = e.relatedTarget;
  17.                     o.num             = num;
  18.                     o.sel             = sel;
  19.                     o.id            = $$.parent().attr('id').substr(4,1);
  20.                     log(o);
  21. //============================END TRACE=====================*/
  22.  
  23.  
  24.                             //1. show the subnav
  25.                             $(sel).css('display','block');
  26.  
  27.                             //2. display the overlay
  28.                             $('#overlay').removeClass('hide');        
  29.  
  30.                             //3. Remove existing hover class, Add the 'hover' class to this item                    
  31.                             rmHover();
  32.                             $$.addClass('hover');
  33.  
  34.  
  35.  
  36.                 },
  37.  
  38.  
  39.                 function(e){    
  40.                     //log(e, {'dir':'OUT','target':e.target, 'relatedTarget': e.relatedTarget});    
  41.                     //if the closest parent search returns zero, we know we're not in nav box anymore
  42.                     checkAncestor(e,"#nav");
  43.                 });
  44.  
  45.         function checkAncestor(child, ancestor){
  46.             child = child.relatedTarget || e.fromElement;
  47.             var $elem = $(child).closest(ancestor);        
  48.             if($elem.length <1) {        
  49.                 hideFlyout();                                
  50.             }                    
  51.         }
  52.         //when mouse levaes both top nav and flyout, and doesn't go from one to the other, close the flyout
  53.         $('#site_navigation, #flyout')
  54.             .mouseleave(function(e){
  55.                 checkAncestor(e,"#nav");
  56.             });
  57.  
  58.         //peg the first two links with a hide function.
  59.         $('.site_navigation > li:eq(0) a, .site_navigation > li:eq(1) a, .site_navigation > li:eq(2) a, .site_navigation > li:eq(3) a, .site_navigation > li:eq(5) a, .site_navigation > li:eq(6) a, .site_navigation > li:eq(7) a')
  60.             .mouseenter(function(){             
  61.                 hideFlyout();                                                          
  62.             });
  63.  
  64.  
  65.         function hideFlyout(){
  66.             rmHover();
  67.             //Hide the subnavs
  68.             $('.subnav').css('display','none');                            
  69.             //Hide the overlay
  70.             $('#overlay').addClass('hide');                            
  71.         }    
  72.  
  73.         function rmHover(){
  74.             //Remove the 'hover' class on nav item
  75.             $('#site_navigation .hover').removeClass('hover');        
  76.  
  77.         }
Dec 2 '10 #1
2 1862
JKing
1,206 Expert 1GB
These types of menus are quite popular and really don't need any javascript at all. The javascript complicates things in my opinion and also may run you into problems if a user has javascript turned off.

Post your CSS and HTML and I may be able to help.
Dec 2 '10 #2
Hi Jking,
Thanks a lot for your reply. please find the html, css and Js code.
Expand|Select|Wrap|Line Numbers
  1.  javascript
  2. $(function(){
  3. /*Start closure*/           
  4.     /********************/        
  5.     //NAVIGATION This is the flyout menu starting
  6.     /********************/
  7.     var num, current = false;
  8.     $('#site_navigation > li.items > a')
  9.         .hoverIntent(function(e){
  10.                     //Clear out the open subnavs
  11.                     $('.subnav').css('display','none');
  12.                     var $$ = $(this);
  13.                     num = parseInt(($$.parent().attr('id')).substr(4,1));        
  14.                     num -= 2;
  15.                     var sel = '#subnav-' + num;
  16.  
  17. /*============================TRACE=========================
  18.                     var o = {};
  19.                     o.dir             ='IN';
  20.                     o.target         = e.target;
  21.                     o.relatedTarget = e.relatedTarget;
  22.                     o.num             = num;
  23.                     o.sel             = sel;
  24.                     o.id            = $$.parent().attr('id').substr(4,1);
  25.                     log(o);
  26. //============================END TRACE=====================*/
  27.  
  28.  
  29.                             //1. show the subnav
  30.                             $(sel).css('display','block');
  31.  
  32.                             //2. display the overlay
  33.                             $('#overlay').removeClass('hide');        
  34.  
  35.                             //3. Remove existing hover class, Add the 'hover' class to this item                    
  36.                             rmHover();
  37.                             $$.addClass('hover');
  38.  
  39.  
  40.  
  41.                 },
  42.  
  43.  
  44.                 function(e){    
  45.                     //log(e, {'dir':'OUT','target':e.target, 'relatedTarget': e.relatedTarget});    
  46.                     //if the closest parent search returns zero, we know we're not in nav box anymore
  47.                     checkAncestor(e,"#nav");
  48.                 });
  49.  
  50.         function checkAncestor(child, ancestor){
  51.             child = child.relatedTarget || e.fromElement;
  52.             var $elem = $(child).closest(ancestor);        
  53.             if($elem.length <1) {        
  54.                 hideFlyout();                                
  55.             }                    
  56.         }
  57.         //when mouse levaes both top nav and flyout, and doesn't go from one to the other, close the flyout
  58.         $('#site_navigation, #flyout')
  59.             .mouseleave(function(e){
  60.                 checkAncestor(e,"#nav");
  61.             });
  62.  
  63.         //peg the first two links with a hide function.
  64.         $('.site_navigation > li:eq(0) a, .site_navigation > li:eq(1) a, .site_navigation > li:eq(2) a, .site_navigation > li:eq(3) a, .site_navigation > li:eq(5) a, .site_navigation > li:eq(6) a, .site_navigation > li:eq(7) a')
  65.             .mouseenter(function(){             
  66.                 hideFlyout();                                                          
  67.             });
  68.  
  69.  
  70.         function hideFlyout(){
  71.             rmHover();
  72.             //Hide the subnavs
  73.             $('.subnav').css('display','none');                            
  74.             //Hide the overlay
  75.             $('#overlay').addClass('hide');                            
  76.         }    
  77.  
  78.         function rmHover(){
  79.             //Remove the 'hover' class on nav item
  80.             $('#site_navigation .hover').removeClass('hover');        
  81.  
  82.         }    
  83.     //This is the flyout menu ending
  84.  
  85.     /********************/        
  86.     //Left Nav Menu Animation
  87.     /********************/
  88.  
  89.     mSetLastItem = function() {
  90.         $(".leftNavTopics a").removeClass("noDarkBorder");
  91.         $(".leftNavTopics a:visible:last").addClass("noDarkBorder");
  92.     }
  93.  
  94.     mShowMenu = function(mE) {
  95.         var mThis = $(this);
  96.  
  97.         if (mThis.next().is(":visible")) {
  98.             mThis.next().slideUp(200);
  99.             mThis.removeClass("otherDarkBorder");
  100.         } else {
  101.             mThis.parent().siblings().find("a:first").removeClass("otherDarkBorder").next().slideUp(200);
  102.             mThis.next().slideDown(200);
  103.             mThis.addClass("otherDarkBorder");
  104.             mThis.next().children(":last").find("a:first").addClass("otherDarkBorder");
  105.         }
  106.  
  107.         mSetLastItem();
  108.         mE.preventDefault();
  109.     }
  110.  
  111.     var mCurrentItem = $(".leftNavTopics .currentItem");
  112.  
  113.     mCurrentItem.parents("ul").show().prev().addClass("blackArrow");
  114.  
  115.     if (mCurrentItem.next()) {
  116.         //mCurrentItem.addClass("darkBorder");
  117.         mCurrentItem.next().children(":last").find("a:first").addClass("darkBorder");
  118.     }
  119.  
  120.     mCurrentItem.next().show().children().find("a:first, a:last").bind("click", mShowMenu);
  121.     mSetLastItem();
  122.  
  123.  
  124. /********************/
  125.         //SHARETOOL
  126.         /********************/ 
  127.  
  128.         $(".content-up a.shareTool").click(function () {
  129.             $('.content-up a.shareTool').removeClass("shareTool").addClass('shareToolActive');
  130.             $('.content-up .page-tools').removeClass("hide");
  131.         });
  132.  
  133.         $(".content-up .page-tools li.email a").click(function () {
  134.             $('.content-up .page-tools .body').animate({ height: "305px" }, 650, function () {
  135.                 $('.content-up .page-tools .body .page-tools-email').fadeIn(200);
  136.             });
  137.  
  138.         });
  139.  
  140.         $(".content-up .cancel-email").click(function () {
  141.             $('.content-up .page-tools .body .page-tools-email').fadeOut(400, function () {
  142.                 $('.content-up .page-tools .body').animate({ height: "130px" }, 650);
  143.             });
  144.  
  145.         });
  146.  
  147.         $(".content-up .page-tools .close").click(function () {
  148.             $('.content-up a.shareToolActive').removeClass("shareToolActive").addClass('shareTool');
  149.             $('.content-up .page-tools').addClass("hide");
  150.             $('.content-up .page-tools .body .page-tools-email').css({ 'display': 'none' });
  151.             $('.content-up .page-tools .body').css({ 'height': '130px' });
  152.         });
  153.  
  154.         /********************/
  155.         //ACCORDION
  156.         /********************/
  157.  
  158.         // Uncomment to show first block as default
  159.         $(".accordion h3:first").addClass("active");
  160.         $(".accordion div:not(:first)").hide();
  161.  
  162.         //$(".accordion .wrapper").hide();
  163.  
  164.         $(".accordion h3").click(function () {
  165.             $(this).next("div.wrapper").slideToggle(400).siblings("div.wrapper:visible").slideUp(400);
  166.             $(this).toggleClass("active");
  167.             $(this).siblings("h3").removeClass("active");
  168.         });
  169.  
  170.         $("div.article p:last-child").css({ 'margin-bottom': '0px' });
  171.  
  172. })
  173.  
  174.  
  175.         /********************/
  176.         //Show and Hide radio buttons toogle
  177.         /********************/
  178. function hideDiv(){ 
  179. tag = document.getElementsByTagName("div"); 
  180. for(x=0;x<tag.length; x++){ 
  181. if(tag[x].getAttribute('id').indexOf("choose_") != -1){ 
  182. tag[x].style.display = "none"; 
  183. function view(id){ 
  184. ge = document.getElementById('choose_' + id.value); 
  185. hideDiv(); 
  186. ge.style.display = "block"; 
  187. // Start of text size increase
  188. var min=8;
  189. var max=18;
  190. function increaseFontSize() {
  191.    var p = document.getElementsByTagName('p');
  192.    for(i=0;i<p.length;i++) {
  193.       if(p[i].style.fontSize) {
  194.          var s = parseInt(p[i].style.fontSize.replace("px",""));
  195.       } else {
  196.          var s = 12;
  197.       }
  198.       if(s!=max) {
  199.          s += 1;
  200.       }
  201.       p[i].style.fontSize = s+"px"
  202.    }
  203. }
  204. function decreaseFontSize() {
  205.    var p = document.getElementsByTagName('p');
  206.    for(i=0;i<p.length;i++) {
  207.       if(p[i].style.fontSize) {
  208.          var s = parseInt(p[i].style.fontSize.replace("px",""));
  209.       } else {
  210.          var s = 12;
  211.       }
  212.       if(s!=min) {
  213.          s -= 1;
  214.       }
  215.       p[i].style.fontSize = s+"px"
  216.    }   
  217. }
  218.  
  219. // End of textsize increase
  220.  
  221.  
Expand|Select|Wrap|Line Numbers
  1.  html code
  2. <div id="nav">
  3.         <ul id="site_navigation">
  4.           <li class="items" id="item1"> <a href="page-5.html"> Electricity and <br />
  5.             gas customers </a> </li>
  6.           <li class="items" id="item2"> <a> Residential </a> </li>
  7.           <li class="items" id="item3"> <a href="page-2.html?cur=3"> Your bills and<br />
  8.             usage </a> </li>
  9.           <li class="items" id="item4"> <a href="page-2.html?cur=4" class="current"> Your services </a> </li>
  10.           <li class="items" id="item5"> <a href="page-2.html?cur=5"> Your National <br />
  11.             Grid </a> </li>
  12.           <li class="items" id="item6"> <a href="page-2.html?cur=6"> Safety and <br />
  13.             outages </a> </li>
  14.           <li class="items" id="item7"> <a href="page-3.html"> Customer <br />
  15.             support </a> </li>
  16.         </ul>
  17.         <!--Start Sub Menu Navigation-->
  18.         <div id="flyout_container">
  19.           <div id="flyout">
  20.             <div class="subnav" id="subnav--1">
  21.               <div class="inner">
  22.                 <div class="column-1 columns">
  23.                   <h5>You are currently in the Massachusetts electric service site</h5>
  24.                   <div class="lightGraytopborder"></div>
  25.                   <div class="whitespacer"></div>
  26.                   <div>Would like to <a href="page-2.html">Go to the Massachusetts gas service site?</a> <br />
  27.                     <br />
  28.                     or <a href="page-2.html">go to the another regional energy service</a>
  29.                     <div class="whitespacer"></div>
  30.                     <div class="whitespacer"></div>
  31.                   </div>
  32.                 </div>
  33.               </div>
  34.             </div>
  35.             <div class="subnav" id="subnav-0">
  36.               <div class="inner">
  37.                 <div class="column-1 columns">
  38.                   <h5>You are currently in Residential customers</h5>
  39.                   <div class="lightGraytopborder"></div>
  40.                   <div class="whitespacer"></div>
  41.                   <div>Would you like to go to another destination?
  42.                     <div class="whitespacer"></div>
  43.                     <div class="lightGraytopborder"></div>
  44.                     <ul>
  45.                       <li><a href="#">Business customers</a></li>
  46.                       <li><a href="#">Tradespeople and customers</a></li>
  47.                       <li><a href="#">Energy analysts</a></li>
  48.                       <li><a href="#">Energy supply companies</a></li>
  49.                       <li><a href="#">Regulators</a></li>
  50.                     </ul>
  51.                   </div>
  52.                 </div>
  53.               </div>
  54.             </div>
  55.             <div class="subnav" id="subnav-1">
  56.               <div class="inner">
  57.                 <div class="column-1 columns">
  58.                   <h5>Your bills and usage</h5>
  59.                   <div class="whitespacer"></div>
  60.                   <div>Lorem ipsum dolor sit amet consectet adipisicing elit,Aliquam elefiend nisi nec mauris ullamcoprepr vitae vulpurtatue tellus aliquet cuarbiter at tortor sit amet<br />
  61.                     <br />
  62.                     <a href="page-2.html">Go now</a></div>
  63.                 </div>
  64.                 <div class="column-2 columns">
  65.                   <ul>
  66.                     <li><a href="page-2.html">View your current bill</a></li>
  67.                     <li><a href="page-2.html">Make a online payment</a></li>
  68.                     <li><a href="page-2.html">Billing and payment options</a></li>
  69.                     <li><a href="page-2.html">Your billing and payment history</a></li>
  70.                   </ul>
  71.                   <p><img alt="Images topnav your service1" src="http://bytes.com/topic/html-css/images/nav-img1.jpg"/><br />
  72.                     <br />
  73.                     Consectetur adipisicing elieiusicing elieiusmod tempor lorem ipsum dolor sit amet lorem<br />
  74.                     <br />
  75.                     <a href="#">Lorem ipsum dolor</a></p>
  76.                 </div>
  77.                 <div class="column-3 columns">
  78.                   <ul>
  79.                     <li><a href="page-2.html">Your usage and cost graph</a></li>
  80.                     <li><a href="page-2.html">Your action plan</a></li>
  81.                     <li><a href="page-2.html">Lower your usage</a></li>
  82.                     <li><a href="page-2.html">Understand your bill and rates</a></li>
  83.                   </ul>
  84.                   <p><img alt="Images topnav your service1" src="http://bytes.com/topic/html-css/images/nav-img2.jpg"/><br />
  85.                     <br />
  86.                     Consectetur adipisicing elieiusicing elieiusmod tempor <br />
  87.                     <br />
  88.                     <a href="#" class="imgBorder">Dolor lorem</a></p>
  89.                 </div>
  90.               </div>
  91.             </div>
  92.             <div class="subnav" id="subnav-2">
  93.               <div class="inner">
  94.                 <div class="column-1 columns">
  95.                   <h5>Your service</h5>
  96.                   <div class="whitespacer"></div>
  97.                   <div>Intro to services offered in this region orem ipsum dolor sit amet, consectetur adipiscing elit. Fusce lectus metus, interdum ut mollis sit amet, porttitor ac magna. Donec sed mi enim<br />
  98.                     <br />
  99.                     <a href="page-2.html">Go now</a></div>
  100.                 </div>
  101.                 <div class="column-2 columns">
  102.                   <ul>
  103.                     <li><a href="page-2.html">Turn on service</a></li>
  104.                     <li><a href="page-2.html">Turn off service</a></li>
  105.                     <li><a href="page-2.html">Check service availability</a></li>
  106.                     <li><a href="page-2.html">Metering</a></li>
  107.                   </ul>
  108.                   <div class="boldtext">For new customers</div>
  109.                   <div class="whitespacer"></div>
  110.                   <p>Lorem ipsum dolor sit amet, consectetur adipiscing
  111.                     elit. Mauris sed purus nisl. Nulla sed tortor a
  112.                     lectus suscipit tempus ipsum.<br />
  113.                     <br />
  114.                     <a href="#">View all information for new customers</a><br />
  115.                     <br />
  116.                     <a href="#">Request to turn on service</a></p>
  117.                 </div>
  118.                 <div class="column-3 columns">
  119.                   <ul>
  120.                     <li><a href="page-2.html">Convert from oil to gas</a></li>
  121.                     <li><a href="page-2.html">Your supplier options</a></li>
  122.                     <li><a href="page-2.html">Generate your own power</a></li>
  123.                     <li><a href="page-2.html">Other services</a></li>
  124.                   </ul>
  125.                   <div class="boldtext">Moving?</div>
  126.                   <div class="whitespacer"></div>
  127.                   <p>Lorem ipsum dolor sit amet, consectetur adipiscing
  128.                     elit. Mauris sed purus nisl. Nulla sed tortor a
  129.                     lectus suscipit tempus ipsum.<br />
  130.                     <br/>
  131.                     <a href="#">View all information for customers planning
  132.                     to move</a><br />
  133.                     <br />
  134.                     <a href="#">Request to move service</a></p>
  135.                 </div>
  136.               </div>
  137.             </div>
  138.             <div class="subnav" id="subnav-3">
  139.               <div class="inner">
  140.                 <div class="column-1 columns">
  141.                   <h5>Your account</h5>
  142.                   <div class="whitespacer"></div>
  143.                   <div><a href="page-2.html">Sign in to your Massachusetts electric service account</a></div>
  144.                 </div>
  145.                 <div class="column-2 columns">
  146.                   <ul>
  147.                     <li><a href="page-2.html">Manage your account</a></li>
  148.                     <li><a href="page-2.html">Manage your payment methods</a></li>
  149.                     <li><a href="page-2.html">Manage your alerts email</a></li>
  150.                   </ul>
  151.                   <div class="boldtext">"My house" and "My garage"</div>
  152.                   <div class="whitespacer"></div>
  153.                   <p>Lorem ipsum dolor sit amet, consectetur adipiscing
  154.                     elit. Mauris sed purus nisl. Nulla sed tortor a lectus suscipit tempus ipsum<br />
  155.                     <br />
  156.                     <a href="#">Learn more about account nicknames</a></p>
  157.                 </div>
  158.                 <div class="column-3 columns">
  159.                   <ul>
  160.                     <li><a href="page-2.html">Manage your profile and sign-in</a></li>
  161.                     <li><a href="page-2.html">Add a new account</a></li>
  162.                   </ul>
  163.                   <br />
  164.                   <div class="whitespacer"></div>
  165.                   <div class="boldtext">You are currently in the {Massachusetts electric} service site</div>
  166.                   <div class="whitespacer"></div>
  167.                   <p>Would you like to <a href="#" class="imgBorder">go to the {Massachusetts
  168.                     gas} service site?</a><br />
  169.                     <br/>
  170.                     Or, <a href="#" class="imgBorder">go to another regional service site.</a></p>
  171.                 </div>
  172.               </div>
  173.             </div>
  174.             <div class="subnav" id="subnav-4">
  175.               <div class="inner">
  176.                 <div class="column-1 columns">
  177.                   <h5>Safety and outages</h5>
  178.                   <div class="whitespacer"></div>
  179.                   <div>Lorem ipsum dolor sit amet,
  180.                     consectetur adipiscing elit.
  181.                     Fusce lectus metus, interdum
  182.                     ut mollis sit amet, porttitor ac
  183.                     magna. Donec sed mi enim<br />
  184.                     <br />
  185.                     <a href="page-2.html">Go now</a></div>
  186.                 </div>
  187.                 <div class="column-2 columns">
  188.                   <ul>
  189.                     <li><a href="page-2.html">Report or check on an outage</a></li>
  190.                     <li><a href="page-2.html">How to report an outage</a></li>
  191.                     <li><a href="page-2.html">Gas interruptions</a></li>
  192.                   </ul>
  193.                   <div class="boldtext">Call before you dig</div>
  194.                   <div class="whitespacer"></div>
  195.                   <p>Lorem ipsum dolor sit amet, consectetur adipiscing
  196.                     elit. Mauris sed purus nisl. Nulla sed tortor a
  197.                     lectus suscipit tempus ipsum.<br />
  198.                     <br />
  199.                     <a href="#">Learn more</a></p>
  200.                 </div>
  201.                 <div class="column-3 columns">
  202.                   <ul>
  203.                     <li><a href="page-2.html">Outage map</a></li>
  204.                     <li><a href="page-2.html">Storm recovery</a></li>
  205.                     <li><a href="page-2.html">Energy safety</a></li>
  206.                   </ul>
  207.                   <div class="boldtext">Carbon monoxide</div>
  208.                   <div class="whitespacer"></div>
  209.                   <p>Lorem ipsum dolor sit amet, consectetur adipiscing
  210.                     elit. Mauris sed purus nisl. Nulla sed tortor a
  211.                     lectus suscipit tempus ipsum<br />
  212.                     <br/>
  213.                     <a href="#" class="imgBorder">Learn more</a></p>
  214.                 </div>
  215.               </div>
  216.             </div>
  217.             <div class="subnav" id="subnav-5">
  218.               <div class="inner">
  219.                 <div class="column-1 columns">
  220.                   <h5>Customer support</h5>
  221.                   <div class="whitespacer"></div>
  222.                   <div>Lorem ipsum dolor sit amet,
  223.                     consectetur adipiscing elit.
  224.                     Fusce lectus metus, interdum
  225.                     ut mollis sit amet, porttitor ac
  226.                     magna. Donec sed mi enim<br />
  227.                     <br />
  228.                     <a href="page-2.html">Go now</a></div>
  229.                 </div>
  230.                 <div class="column-2 columns">
  231.                   <ul>
  232.                     <li><a href="page-2.html">Get answers to common questions</a></li>
  233.                     <li><a href="page-2.html">Problems with your bill</a></li>
  234.                     <li><a href="page-2.html">Payment assistance programs</a></li>
  235.                     <li><a href="page-2.html">Service problems</a></li>
  236.                   </ul>
  237.                   <div class="boldtext">Service problems may include:</div>
  238.                   <div class="whitespacer"></div>
  239.                   <p>Power outages, energy theft,
  240.                     street lights in need of repair, or
  241.                     metering problems<br />
  242.                     <br />
  243.                     <a href="#">View details</a></p>
  244.                 </div>
  245.                 <div class="column-3 lastTab columns">
  246.                   <ul>
  247.                     <li><a href="page-2.html">Customer rights and responsibilities</a></li>
  248.                     <li><a href="page-2.html">Contact us</a></li>
  249.                     <li><a href="page-2.html">Send us feedback</a></li>
  250.                   </ul>
  251.                   <br />
  252.                   <div class="whitespacer"></div>
  253.                   <div class="boldtext">Report a gas emergenc</div>
  254.                   <div class="whitespacer"></div>
  255.                   <p>[insert local gas emergency module
  256.                     - no links, only informational]</p>
  257.                 </div>
  258.               </div>
  259.             </div>
  260.           </div>
  261.         </div>
  262.  
Expand|Select|Wrap|Line Numbers
  1.  css code
  2. /*//////////////////////////// Start Top Navigation Section /////////////////////////////////////////*/
  3.  
  4. .hide {
  5.     display: none;
  6. }
  7. #overlay {
  8.     background:#000;
  9.     height:1250px;
  10.     left:0;
  11.     opacity:0.4;
  12.     filter:alpha(opacity= 40);
  13.     top:149px;
  14.     width:100%;
  15.     position:absolute;
  16.     z-index:1000;
  17. }
  18. object {
  19.     display:block;
  20. }
  21. #nav {
  22.     width: 940px;
  23.     display: block;
  24.     float: left;
  25. }
  26. #nav #flyout_container {
  27.     position: relative;
  28.     z-index: 1001;
  29. }
  30. #nav #flyout_container #flyout {
  31.     width: auto;
  32.     display: inline;
  33.     float: right;
  34.     position: relative;
  35.     margin: 0 -120px 1.5em -1px;
  36.     margin-right: 0;
  37.     position: absolute;
  38.     left: 0;
  39.     top: 0px;
  40.     color:#9b9b9b;
  41.     z-index:1001;
  42. }
  43. #nav #flyout_container #flyout .subnav {
  44.     background: #f2f2f2;
  45.     height:auto;
  46.     display: none;
  47. }
  48. #nav #flyout_container #flyout .subnav a {
  49.     color:#0162c0;
  50. }
  51. #
  52. #flyout_container #flyout .subnav a:hover {
  53.     text-decoration: underline;
  54. }
  55. #nav #flyout_container #flyout .subnav .inner {
  56.     width: auto;
  57. }
  58. #nav #flyout_container #flyout .subnav .inner .columns {
  59.     display: inline;
  60.     float: left;
  61.     margin-right: 20px;
  62.     width: auto;
  63.     margin-top: 40px;
  64. }
  65. #flyout {
  66.     background-color:#f2f2f2;
  67. }
  68. #nav #flyout_container #flyout .subnav .inner .column-2 a, #nav #flyout_container #flyout .subnav .inner .column-3 a {
  69.     padding:5px 0px 10px 0px;
  70.     font-weight:bold;
  71.     font-size:11px;
  72. }
  73. #nav #flyout_container #flyout .subnav .inner .column-1 {
  74.     margin-top: 0px;
  75.     display: inline;
  76.     float: left;
  77.     margin-right: 20px;
  78.     width: auto;
  79.     margin: 0 20px 0 20px;
  80.     width:300px;
  81.     font-size:11px;
  82.     font-weight:bold;
  83. }
  84. #nav #flyout_container #flyout .subnav .inner .column-1 ul li {
  85.     padding:8px 0px 8px 0px;
  86.     border-bottom: solid 1px #ccc;
  87.     margin-left:-16px;
  88.     width:300px;
  89. }
  90. #nav #flyout_container #flyout .subnav .inner .column-2 {
  91.     text-align: left;
  92.     padding: 0px 0px 0px 0px;
  93.     width:270px;
  94. }
  95. #nav #flyout_container #flyout .subnav .inner .column-2 ul li {
  96.     padding:8px 0px 8px 0px;
  97.     border-bottom: solid 1px #ccc;
  98.     margin-left:-16px;
  99.     width:230px;
  100. }
  101. #nav #flyout_container #flyout .subnav .inner .column-2 p {
  102.     padding: 0px 0px 0px 0px;
  103.     color:#6d6d6d;
  104.     width:230px;
  105. }
  106. #nav #flyout_container #flyout .subnav .inner .column-2 p a {
  107.     border-bottom: none;
  108. }
  109. #nav #flyout_container #flyout .subnav .inner .column-3 {
  110.     margin-right:0;
  111.     width:270px;
  112. }
  113. #nav #flyout_container #flyout .subnav .inner .column-3 ul li {
  114.     padding:8px 0px 8px 0px;
  115.     border-bottom: solid 1px #ccc;
  116.     margin-left:-16px;
  117.     width:230px;
  118. }
  119. #nav #flyout_container #flyout .subnav .inner .column-3 p {
  120.     padding: 0px 0px 0px 0px;
  121.     color:#6d6d6d;
  122.     width:250px;
  123. }
  124. #nav #flyout_container #flyout .subnav .inner .column-3 p a {
  125.     border-bottom: none;
  126. }
  127. #nav #flyout_container h5 {
  128.     margin:20px 5px 10px 0px;
  129.     font-size: 16px;
  130.     line-height: 20px;
  131. }
  132. .flyout-item1 {
  133.     width:450px;
  134. }
  135. .lastTab {
  136.     padding-right: 40px;
  137. }
  138. #site_navigation {
  139.     margin: 0;
  140.     height: 54px;
  141. }
  142. #site_navigation .items a {
  143.     color: #333333;
  144.     background-image: url(../images/blarrow.gif);
  145.     background-position: right 6px;
  146.     background-repeat: no-repeat;
  147.     line-height:14px;
  148.     font-size:8.8pt;
  149. }
  150. #site_navigation .items a:hover {
  151.     color: #0055ab;
  152. }
  153.  
  154. #site_navigation .items a.current {
  155.     background-color: #0055ab;
  156.     background-image: url(../images/wharrow.gif);
  157.     background-position: right 10px;
  158.     color: #ffffff;
  159. }
  160. #site_navigation .items a.current:hover {
  161.     color: #000000;
  162. }
  163. #site_navigation li {
  164.     display: inline;
  165.     float: left;
  166.     margin: 0;
  167.     width: 133px;
  168.     border-right: solid 1px #efefef;
  169. }
  170. #site_navigation li a {
  171.     display: block;
  172.     height: 50px;
  173.     padding: 4px 3px 0 11px;
  174.     font-weight: bold;
  175.     letter-spacing: .3px;
  176. }
  177. #site_navigation #item7 {
  178.     width: 135px;
  179. }
  180. #site_navigation #item8 {
  181.     width: 100px;
  182. }
  183. #site_navigation #item1 a:hover, #site_navigation #item2 a:hover, #site_navigation #item3 a:hover, #site_navigation #item4 a:hover, #site_navigation #item5 a:hover, #site_navigation #item6 a:hover, #site_navigation #item7 a:hover, #site_navigation #item8 a:hover, #site_navigation #item9 a:hover {
  184.     text-decoration:underline;
  185.     cursor:pointer;
  186.     background-color:#f2f2f2;
  187.     background-image: url(../images/blarrow.gif);
  188. }
  189. /*//////////////////////////// End Top Navigation Section /////////////////////////////////////////*/
  190.  
Dec 2 '10 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: nam | last post by:
could someone please help me with this bizarre problem - I've created a swf file at the top of my html page. The swf file (using Swish) is simply a menu of 5 links to 5 anchor points on the html...
3
by: sean | last post by:
///////////////////// var xmlhttp = new ActiveXObject("Microsoft.XMLHTTP"); xmlhttp.open("POST", "http://somesite/logon.asp", false, "domain\username", "password"); xmlhttp.send();...
1
by: Todd Cary | last post by:
One of my clients wants me to incoroporate a Flyout menu in the left panel. I found the Washington U has some demos on Flyout menus, however their demo "creeps" down the page when run in IE 6; not...
1
by: Murray Patrick via DotNetMonster.com | last post by:
I am only just begun using .net etc. I create a program (etc), it compiled and ran on the local machine. The program was then uploaded on a remote server. I have found in testing it that the...
1
by: sck10 | last post by:
Hello, I have a table with some controls in it, but it is not rapped in a form. I also have a button for reseting the page. When I click the button, the page resets, but I get the following...
9
by: lev | last post by:
Attempting to use javascript's regular expression methods to match a particular lab number and building which would then be copied to a pair of textfields, I found that general matching characters...
1
by: nandakumar.raghu | last post by:
Hi, I have written a javascript function that acceses properties from an activex object. - <OBJECT id="alertObj" classid="clsid:AEE77194-B98F-4E0E-A27F-4AD6B23F0038"></OBJECT> function...
2
by: SysTechGuy | last post by:
I am a Systems Tech for a Library Consortium and one of our library clients wants to know if "there are any free internet sites for javascript flyout menus." If I understand his question, I think...
16
by: viki1967 | last post by:
Hi all. I have problem with this string javascript: onclick="if(confirm('Confirm?')) location.href('form.asp?A=terry.d'arby'); return false; The error javascript is: Error: Expected ')' ...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.