STK.navigation.toggleMenu

This method is used for toggling a menu when a trigger is clicked.

  1. jQuery objectmenu
  2. jQuery objecttrigger
  3. Object[options]

When trigger is clicked, the menu is toggled using a slide down / slide up effect (speed can be overriden in options.speed). When the menu is visible, the trigger is given a "expanded" CSS class, otherwise a "contracted" class.

Examples

Input

STK.navigation.toggleMenu($('header nav'), $('header .menu-trigger'));

Input

// Set slide speed to 1000 ms
STK.navigation.toggleMenu($('header nav'), $('header .menu-trigger'), {speed: 1000});

Parameters

menu
The menu element object
Type
jQuery object
trigger
The trigger element object
Type
jQuery object
options
Type
Object