Javascript API

Knowledgebase Docs » ShiftNav
USEFUL? 13

ShiftNav provides a simple javascript API for opening and closing the menu.

Pass the ID of the ShiftNav panel to control it.

Functions

Open the ShiftNav Panel
jQuery( '#shiftnav-main' ).shiftnav( 'openShiftNav' );
Close the ShiftNav Panel
jQuery( '#shiftnav-main' ).shiftnav( 'closeShiftNav' );

Events

shiftnav-loaded

Triggered on the .shiftnav element when it has finished initializing

shiftnav-open

Triggered on a .shiftnav panel when it is opened

shiftnav-close

Triggered on a .shiftnav panel when it is closed

shiftnav-open-submenu

Triggered on a parent item (li) when its submenu is opened

shiftnav-close-submenu

Triggered on a parent item (li) when its submenu is closed