0

I am trying to modify the mouse over speed or hover speed for this mega menu where when the user hovers over the buttons there is a .3 second delay before the drop down menus launch. Here is the actual site http://adobe-accessibility.github.io/Accessible-Mega-Menu/

and the jquery here: http://adobe-accessibility.github.io/Accessible-Mega-Menu/js/jquery-accessibleMegaMenu.js

Appreciate any tips.

Thanks in advance, Rick

Ricardo79
  • 5
  • 5

2 Answers2

0

Yes, please check the megamenu.css file lines 139 and 151, just change values of Transitions ease.

    -webkit-transition: opacity 250ms ease 250ms, max-height 500ms ease, visibility 0s linear 500ms, top 0s linear 500ms;
       -moz-transition: opacity 250ms ease 250ms, max-height 500ms ease, visibility 0s linear 500ms, top 0s linear 500ms;
        -ms-transition: opacity 250ms ease 250ms, max-height 500ms ease, visibility 0s linear 500ms, top 0s linear 500ms;
         -o-transition: opacity 250ms ease 250ms, max-height 500ms ease, visibility 0s linear 500ms, top 0s linear 500ms;
            transition: opacity 250ms ease 250ms, max-height 500ms ease, visibility 0s linear 500ms, top 0s linear 500ms;

    border: 1px solid rgba(0,0,0,0.3);
    border-top-right-radius: 3px;
    border-bottom-right-radius: 3px;
    border-bottom-left-radius: 3px;
}

.accessible-megamenu .accessible-megamenu-panel.open {
    visibility: visible;
    top: 3em;
    max-height: 1200px;
    opacity: 1;
    z-index: 1001;
    -webkit-transition: opacity 250ms ease, max-height 500ms ease, visibility 0s linear 0s, top 0s linear 0s;
       -moz-transition: opacity 250ms ease, max-height 500ms ease, visibility 0s linear 0s, top 0s linear 0s;
        -ms-transition: opacity 250ms ease, max-height 500ms ease, visibility 0s linear 0s, top 0s linear 0s;
         -o-transition: opacity 250ms ease, max-height 500ms ease, visibility 0s linear 0s, top 0s linear 0s;
            transition: opacity 250ms ease, max-height 500ms ease, visibility 0s linear 0s, top 0s linear 0s;
}

I hope this help you.

Regards.

Remy Ticona
  • 333
  • 2
  • 6
0

I'm actually trying to do this via JQuery. The following code is working with .3 second delay on mouse out however I'm not sure how I can make it work for MouseOver:

 _mouseOverHandler =  function (event) {
        clearTimeout(this.mouseTimeoutID);
        $(event.target) 
            .addClass(this.settings.hoverClass);
        _togglePanel.call(this, event);  
        if ($(event.target).is(':tabbable')) {
            $('html').on('keydown.accessible-megamenu', $.proxy(_keyDownHandler, event.target));
        }
    };

    /**
     * @name jQuery.fn.accessibleMegaMenu~_mouseOutHandler
     * @desc Handle mouseout event on mega menu.
     * @param {event} Event object
     * @memberof jQuery.fn.accessibleMegaMenu
     * @inner
     * @private

     Exit Time is now .300 seconds

     */
    _mouseOutHandler = function (event) {
        var that = this;
        $(event.target)
            .removeClass(that.settings.hoverClass);

        that.mouseTimeoutID = setTimeout(function () {
            _togglePanel.call(that, event, true);
        }, 300);
        if ($(event.target).is(':tabbable')) {
            $('html').off('keydown.accessible-megamenu');
        }
    };
Ricardo79
  • 5
  • 5