JSPM

  • Created
  • Published
  • Downloads 306
  • Score
    100M100P100Q85298F
  • License ISC

Allows to create mega menu functionality, including events, and callbacks.

Package Exports

  • @borngroup/born-megamenu

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@borngroup/born-megamenu) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

Usage

import Megamenu from '@brongroup/born-megamenu';

const MEGAMENU_OPTIONS = {
    menuSelector: '#navigation',
    triggerSelector: '.flyout__trigger',
    targetSelector: '.flyout__target',
    transitionWaitSelector: '.flyout',
    clickThroughClass: 'lvl1',
    unsetRelativesClass: 'no-flyout',
    hoverDelay: 150,
    afterMenuSet: function(trigger) { ... },
    afterMenuUnset: function(trigger) { ... },
    beforeItemSet: function(trigger) { ... },
    afterItemUnset: function(trigger) { ... },
    responsive: [
        {
            breakpoint: breakpoints.mobile,
            settings: {
                events: 'click',
                unsetOnMouseleave: false,
                clickThroughClass: false
            }
        }
    ]
}

let mainNav = new Megamenu(MEGAMENU_OPTIONS);