HTML header menu dropdown not clickable


Guy Richards

OK. I have a header designed in HTML - however, every time I hover over a product, and click the ANY submenu, I can't (they disappear before being clicked).

A live example can be seen at http://www.bwl-ny.com .

Any suggestions?

Custom.js

$(document).ready(function() {

//INITIALIZES PRETTYPHOTO PLUGIN

    $("a[rel^='prettyPhoto']").prettyPhoto({theme:'light_square'}); //choose between different styles / dark_rounded / light_rounded / dark_square / light_square / facebook /

//INITIALIZES TWITTER FEED PLUGIN

    $('.twitter-feed').tweet({
        username: 'ABrighterWorld',  //just enter your twitter username
        join_text: 'auto',
        avatar_size: null,
        count: 2, //number of tweets showing
        auto_join_text_default: '',
        loading_text: 'loading latest tweets...' //text displayed while loading tweets
    });

// FLICKR PLUGIN

    $('#flickr-images').append('<ul></ul>');

    $('#flickr-images ul').jflickrfeed({
        limit: 10,
        qstrings: {
            id: 'myflickrID', // enter Flickr ID i.e. 67956216@N02  
            tags: 'tags-here'  // Displays images with selected tags (optional)
        },

        itemTemplate: '<li><a href="{{image_b}}" rel="prettyPhoto" ><img src="{{image_s}}" alt="{{title}}" /></a></li>'

        }, function(data) {
            $('#flickr-images li a').prettyPhoto({theme:'light_square'});
        });


// TEXTBOX ACTIVE

    $('.textbox, #message, #comment').focus(function (){
        $(this).css({borderColor : '#bbb'});
            $(this).blur(function (){
                $(this).css({borderTopColor : '#d1d1d1', borderLeftColor : '#d1d1d1', borderBottomColor : '#e1e1e1', borderRightColor : '#e1e1e1'});
            });
    });



//TAB NAVIGATION

    $('ul.tab-nav').tabs('.tabs > .tab-panels > div', {effect: 'fade'});


// PORTFOLIO HOVER EFFECT - OVERLAY

    $('.gallery-overlay a img').hover(function() {      
        $(this).stop().animate({ 
            opacity : '.1'
        }, 300);
            }, function() {
                $(this).stop().animate({ 
                    opacity : '1' 
                }, 500);
            }); 


// PORTFOLIO FILTER             

    $('ul#filter a').click(function() {
        $(this).css('outline','none');
        $('ul#filter .active-filter').removeClass('active-filter');
        $(this).parent().addClass('active-filter');

        var filterVal = $(this).attr('href').toLowerCase().replace(' ','-');

        if(filterVal == 'all') {
            $('ul.gallery-thumbs li.hidden').fadeIn('slow').removeClass('hidden');
        } else {
            $('ul.gallery-thumbs li').each(function() {
                if(!$(this).hasClass(filterVal)) {
                    $(this).fadeOut('normal').addClass('hidden');
                } else {
                    $(this).fadeIn('slow').removeClass('hidden');
                }
            });
        }

        return false;
    }); 


//TOGGLE PANELS

    $('.toggle-content').hide();  //hides the toggled content, if the javascript is disabled the content is visible

    $('.toggle-header a').click(function () {       

        if ($(this).is('.tog-close')) {
            $(this).removeClass('tog-close')
            .addClass('tog-open')
            .closest('.toggle-header')
            .next('.toggle-content')
            .slideToggle(300);
            return false;
        }       
        else {
            $(this).removeClass('tog-open')
            .addClass('tog-close')
            .closest('.toggle-header')
            .next('.toggle-content')
            .slideToggle(300);
            return false;
        }
    }); 


// TOOLTIPS

    $('.social-links li[title]').tooltip({
        effect: 'fade',
        fadeInSpeed: 300,
        fadeOutSpeed: 200,
        opacity: 0.9,
        offset: [-5, 0]     
    }); 


// SOCIAL LINKS

    $(function() {
        $('.social-links li').animate({
            opacity : '.4'  // sets the opacity to 50% to all social link images
        }); 

        $('.social-links li').hover(function() {  
            $(this).stop().animate({ 
                opacity: '1'  // on hover sets the opacity to 100% to all social link images
            });
        }, function() {
                $(this).stop().animate({ 
                    opacity : '.4'
                });
            });
    });


// SCROLL TOP   

    $('.scroll-top').hover(function() {     
        $(this).stop().animate({ 
            opacity : '1'
        }, 300);
            }, function() {
                $(this).stop().animate({ 
                    opacity : '.6' 
                }, 500);
            }); 

    $('.scroll-top').click(function () {
        $('body,html').animate({
            scrollTop: 0
        }, 800);
        return false;
    });


//NAVIGATION DROPDOWN ANIMATION 

    $('#navigation ul').css({display: 'none'}); // Opera Fix

    $("ul#navigation").superfish({
            hoverClass:    'dropdown',          // the class applied to hovered list items 
            pathClass:     'overideThisToUse', // the class you have applied to list items that lead to the current page 
            pathLevels:    1,                  // the number of levels of submenus that remain open or are restored using pathClass 
            delay:         1000,                // the delay in milliseconds that the mouse can remain outside a submenu without it closing 
            animation:     {opacity:'show',height:'show'},     // an object equivalent to first parameter of jQuery’s .animate() method 
            speed:         'fast',           // speed of the animation. Equivalent to second parameter of jQuery’s .animate() method 
            autoArrows:    false,               // if true, arrow mark-up generated automatically = cleaner source code at expense of initialisation performance 
            dropShadows:   false    
    });


// IE Button hover fix  
$(function (){  

    var button = $('.button');

    if ($.browser.msie) {
        $(button).css( {backgroundPosition: "-20px 35px"} ).hover(function() {      
            $(this).stop()
                .animate({ 
                    backgroundPositionX: "-20px",
                    backgroundPositionY: "94px"             
                },300);

                }, 
                function() {
                    $(this).stop().animate({ 
                    backgroundPositionX: "-20px",
                    backgroundPositionY: "35px"             
                },300).css({backgroundPosition: "-20px 35px"});
            });
        }       
});


}); //END of jQuery

HTML source:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title>Brighter World Lighting - NY</title>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <!--imports the main css file-->
    <link rel="stylesheet" type="text/css" media="screen" href="css/style.css" />
    <!--imports prettyPhoto css file-->
    <link rel="stylesheet" type="text/css" media="screen" href="css/prettyPhoto.css" />
    <!--imports jquery-->
    <script type="text/javascript" src="js/jquery-1.7.1.min.js"></script>
    <!--imports twitter feed plugin-->
    <script type="text/javascript" src="js/jquery.tweet.js"></script>
    <!--imports easing plugin-->
    <script type="text/javascript" src="js/easing.js"></script>
    <!--imports prettyPhoto plugin-->
    <script type="text/javascript" src="js/jquery.prettyPhoto.js"></script>
    <!--imports jQuery Tools plugin-->
    <script type="text/javascript" src="js/jquery.tools.min.js"></script>
    <!--imports jQuery superfish plugin-->
    <script type="text/javascript" src="js/superfish.js"></script>
    <!--imports jQuery jflickrfeed plugin-->
    <script type="text/javascript" src="js/jflickrfeed.min.js"></script>
    <!--imports jQuery AsyncSlider plugin-->
    <script type="text/javascript" src="js/jquery.asyncslider.min.js"></script>
    <!--imports custom javascript code-->
    <script type="text/javascript" src="js/custom.js"></script>
    <script language="javascript" type="text/javascript">
        $(document).ready(function () {
            // Setup Slider
            $("#async-slider").asyncSlider({
                keyboardNavigate: true,
                easing: 'easeInOutExpo',
                minTime: 600,
                maxTime: 1500,
                autoswitch: 4800,
                centerPrevNextNav: false,
                slidesNav: false
            });
        });
    </script>
    <!--[if IE 7]><link href="css/ie7.css" rel="stylesheet" type="text/css" media="screen" />
    <![endif]-->
    <!--[if IE 8]><link href="css/ie8.css" rel="stylesheet" type="text/css" media="screen" />
    <![endif]-->
</head>

<body>
    <div id="header" class="pattern-1">
        <div id="header-inner">
            <div id="logo">
                <img src="img/logo.png" alt="image description" />
                <div id="title">
                    <h1><a href="index.asp"></a></h1>
                    <p></p>
                </div><!-- end title -->
            </div><!-- end logo -->
            <ul id="navigation">
                <li>
                    <a class="active-nav" href="index.asp">Home</a>
                </li>
                <li>
                    <a href="partnership.html">
                        Energy Partnership Program
                    </a>
                </li>
                <li>
                    <a href="http://bwl.ereverseauction.com">
                        Energy Auction
                    </a>
                </li>
                <li>
                    <a href="#">Affiliates</a>
                </li>
                <li id="menu-item-23" class="menu-item menu-item-type-post_type menu-item-object-page current-menu-ancestor current_page_ancestor menu-item-23">
                    <a href="products.html">Products</a>
                    <ul class="sub-menu">
                        <li id="menu-item-31" class="menu-item menu-item-type-post_type menu-item-object-page current-menu-ancestor current-menu-parent current_page_parent current_page_ancestor menu-item-31">
                            <a href="indoor.html">Indoor Lighting</a>
                        </li>
                        <li id="menu-item-34" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-34">
                            <a href="outdoor.html">Outdoor Lighting</a>
                            <ul class="sub-menu">
                                <li id="menu-item-68" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-68"><a href="http://brighterworldlightingllc.com/excelsior-series/">Street Lighting</a></li>
                            </ul>
                        </li>
                        <li id="menu-item-30" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-30"><a href="http://brighterworldlightingllc.com/outdoor-lighting/">OEM/ODM Support</a></li>
                    </ul>
                </li>
                <li>
                    <a href="about.asp">About Us</a>
                </li>
                <li>
                    <a href="contact.html">Contact Us</a>
                </li>
            </ul><!-- end navigation -->
Oger

This is because of CSS rules. It's in the file style.css line 557 and is the selector for media="screen" #navigation ul margin-top: 24px. This pushes the child UL below the parent, so when you hover the parent it shows up, but when you move down you move from the parent element to the top edge of that child , so you no longer need to suspend the parent and the child is gone. This top margin creates a "gap" between them, so you have to hold the hover event very fast to keep the child open. I might change it to padding? But you need to change the background color from UL to LI, or maybe add a delay to the hover event to give them time to move down to the child elements, but it may still disappear if they hover in the gaps for them

Related


HTML header menu dropdown not clickable

Guy Richards OK I have a header designed in HTML - however, every time I hover over a product, and click the ANY submenu, I can't (they disappear before being clicked). A live example can be seen at http://www.bwl-ny.com . Any suggestions? Custom.js $(document

Clickable dropdown menu in joomla

A. Goat milk I have CSS(HTML) horizontal menus and everything works fine, but when I touch one of the menu " lists " with the mouse it appears, but I want to make it clickable. I tried almost everything in this line: .main-nav-ul li:hover ul { display: blo

Clickable dropdown menu in joomla

A. Goat milk I have CSS(HTML) horizontal menus and everything works fine, but when I touch one of the menu " lists " with the mouse it appears, but I want to make it clickable. I tried almost everything in this line: .main-nav-ul li:hover ul { display: blo

Wordpress dropdown menu not clickable on mobile

Gitandra Sawan I'm building a site using WordPress (4.9.8) with the SHOPISLE theme. But I have a problem here, I have added a dropdown menu to my main menu. I've noticed that dropdown menu clicks don't work with mobile views. The second menu has a drop down me

Bootstrap dropdown menu links are not clickable

Hermen I have a page: http://www.poh.me/nordisk/ where the dropdown menu links on the page work, but the anchor 's sublinks (eg http://www.poh.me/nordisk/ contact/ ) becomes unclickable I've tried everything, including removing the data toggle from the link fo

How to make dropdown menu clickable?

Jorganho I'm making a website that requires 15 HTML files. I made navbar3 direct links nav-itemsand 2 dropdown menus. How can I make the dropdown menu not show on click but show on hover and send me to the dropdown link hrefwhen I click on it ? I tried to put

Bootstrap dropdown menu links are not clickable

Hermen I have a page: http://www.poh.me/nordisk/ where the dropdown menu links on the page work, but the anchor 's sublinks (eg http://www.poh.me/nordisk/ contact/ ) becomes unclickable I've tried everything, including removing the data toggle from the link fo

Swift: Can I keep the dropdown menu clickable

Christoph I am using a dropdown menu in my project which is inside a tableview. So far I have been able to make it overflow normally by making the cell zPosistion higher than the others cell.layer.zPosition = 3 and use the following code to make it clickable

Swift: Can I keep the dropdown menu clickable

Christoph I am using a dropdown menu in my project which is inside a tableview. So far I have been able to make it overflow normally by making the cell zPosistion higher than the others cell.layer.zPosition = 3 and use the following code to make it clickable

Bootstrap Mobile dropdown menu links are not clickable

Miura City I am using the latest version of Twitter Bootstrap (2.3.2) as the framework for my website. The only problem I have with Bootstraps navmenu is that the dropdown links are not clickable when viewing the site on my phone. When you try to click the lin

Swift: Can I keep the dropdown menu clickable

Christoph I am using a dropdown menu in my project which is inside a tableview. So far I have been able to make it overflow normally by making the cell zPosistion higher than the others cell.layer.zPosition = 3 and use the following code to make it clickable

Swift: Can I keep the dropdown menu clickable

Christoph I am using a dropdown menu in my project which is inside a tableview. So far I have been able to make it overflow normally by making the cell zPosistion higher than the others cell.layer.zPosition = 3 and use the following code to make it clickable

Swift: Can I keep the dropdown menu clickable

Christoph I am using a dropdown menu in my project which is inside a tableview. So far I have been able to make it overflow normally by making the cell zPosistion higher than the others cell.layer.zPosition = 3 and use the following code to make it clickable

Swift: Can I keep the dropdown menu clickable

Christoph I am using a dropdown menu in my project which is inside a tableview. So far I have been able to make it overflow normally by making the cell zPosistion higher than the others cell.layer.zPosition = 3 and use the following code to make it clickable

Swift: Can I keep the dropdown menu clickable

Christoph I am using a dropdown menu in my project which is inside a tableview. So far I have been able to make it overflow normally by making the cell zPosistion higher than the others cell.layer.zPosition = 3 and use the following code to make it clickable

Bootstrap Mobile dropdown menu links are not clickable

Miura City I am using the latest version of Twitter Bootstrap (2.3.2) as the framework for my website. The only problem I have with Bootstraps navmenu is that the dropdown links are not clickable when viewing the site on my phone. When you try to click the lin

Dropdown menu with header centered vertically

Rasmus Joseph Ludkin EDIT: Seeing both people misunderstand what I'm trying to do - I'll be clear: I'm looking for the DROP UP menu from the footer, not the DROP DOWN menu from the header. This crap has been bugging me for about a week now. http://jsfiddle.net

Dropdown menu with header centered vertically

Rasmus Joseph Ludkin EDIT: Seeing both people misunderstand what I'm trying to do - I'll be clear: I'm looking for the DROP UP menu from the footer, not the DROP DOWN menu from the header. This crap has been bugging me for about a week now. http://jsfiddle.net

Menu dropdown not working - Elementor header menu on Wordpress

Omar Mustafa The header is designed using the "Elementor - Header, Footer & Block" plugin. The dropdown menu doesn't work. Try activating, deactivating plugins, clearing cache. Website link : https://www.party-monsters.com/ Bautik Try the code below. The code

html CSS dropdown menu

Nick Prieto This is my first ever post on Stack Overflow and I'm not familiar with the forum rules for posting. So please let me know anything I'm doing wrong. I've researched this on forums, but nothing I've come across has given me a clear answer. I'm trying

Dropdown menu in HTML/CSS

music music I'm trying to create a dropdown menu in HTML/CSS, but I can't find anything. I'm trying to display content divonly on Channel buttonhover . I tried looking at w3schools but it didn't help. .NavWrapper { background: grey; max-width: 5000px; min-w

HTML/VBA dropdown menu

David I have a little problem with VBA and HTML routines. I had to select the "Sort by:" dropdown menu from the link https://www.betexplorer.com/next/soccer/ and select the "League" item. I can't do this via VBA. This is the code I wrote Sub Scarica() Dim IE A

Dropdown menu HTML + CSS

Giantqtipz Try practicing creating dropdown lists. Not sure if this is the best way, but here's my take. https://jsfiddle.net/dtkreox3/1/ HTML <ul class="test"> <li class="main"><a href="#">Hover</a> <ul class="sub"> <li>Link 1</li> <li>Link

HTML dropdown menu

Dan Anderson I'm trying to create a very basic dropdown menu with list items. Can anyone tell me how I would create the following dropdown: <div class="main-menu"> <ul class="menu-list">

JavaScript and HTML with dropdown menu

duodenum I am using javascript dropdown menu. My HTML is invalid and I can't find the problem...I think I'm doing it right, but maybe the link is not working. $(document).ready(function() { $("article.hey > *:not(header)").hide(); $("article.hey header").o