Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • tcspinks Friend
    #151071

    I am using Zeolite ii with Mega Menu. I found it frustrating when the you had to drag the mouse over the menu to get to a link and the menu opened all fast and blocked what you were trying to get at.

    So, I tweaked the Javascript to delay opening of the mega menu and thought I would share:

    First, open mega.js in the template/js/menu/ directory.

    Find the following code and add the bold lines:


    var jaMegaMenuMoo = new Class({
    initialize: function(menu, options){
    this.options = Object.extend({
    slide: true,
    duration: 300,
    transition: Fx.Transitions.Sine.easeOut,
    fading: false,
    bgopacity: 0.9,
    delayHide: 500,
    delayShow: 400,

    Also, you need to find and add the following in the same file:


    if (this.options.action == 'mouseover' || this.options.action == 'mouseenter') {
    li.addEvent('mouseenter', function(e) {
    if (li.hasClass ('group')) return;
    $clear (li.timer);
    if (li.childcontent) li.timer = setTimeout(this.itemShow.bind(this, [li, e]), this.options.delayShow);
    else this.itemShow (li);
    e.stop();
    }.bind (this));

    And that should do it! I messed around with timing and found delayShow: 400 to be ideal.

    TomC Moderator
    #369205

    In the future, referencing LINE NUMBERS within the mega.js would have been very helpful
    instead of “you need to find . . . ”

    Much of the code looks nearly identical – save for the corresponding line numbers.

    tekstlogo Friend
    #388530

    Thanks for the info.

    Joomlart should apply that for the JA toolbar in the bottum as well 🙂

Viewing 3 posts - 1 through 3 (of 3 total)

This topic contains 3 replies, has 3 voices, and was last updated by  tekstlogo 13 years, 7 months ago.

We moved to new unified forum. Please post all new support queries in our New Forum