Slicknav Test: aktiv < 768px

Vorteile:

  • funktioniert out-of-the-box sehr gut
  • mit modernizr gut responsive

Nachteile:

  • braucht für media query modernizr
  • könnte mit Untermenüs schwierig werden... was wenn Toplevel kein Link ist?
  • mit modernizr 2 zusätzliche Requests, slicknav aber nur 4kb

Optionen:

  'label' : 'MENU', // Label for menu button. Use an empty string for no label.
  'duplicate': true, // If true, the mobile menu is a copy of the original.
  'duration': true, // The duration of the sliding animation.
  'easingOpen': 'swing', // Easing used for open animations.
  'easingClose': 'swing' // Easing used for close animations.
  'closedSymbol': '►', // Character after collapsed parents.
  'openedSymbol': '▼', // Character after expanded parents.
  'prependTo': 'body', // Element, jQuery object, or jQuery selector string to prepend the mobile menu to.
  'parentTag': 'a', // Element type for parent menu items.
  'closeOnClick': false, // Close menu when a link is clicked.
  'allowParentLinks': false // Allow clickable links as parent elements.
  'nestedParentLinks': true // If false, parent links will be separated from the sub-menu toggle.
  'showChildren': false // Show children of parent links by default.
  'brand': '' // Add branding to menu bar.
  

Fazit:

  • sieht gut aus. Testen!

Quellen: