Javascript API

SlickMenu.toggle

Toggle a menu

Usage

SlickMenu.toggle(menu_id, callback)

Arguments

Param Type Details
menu_id interger

WordPress Slick Menu ID

callback function()

On complete callback function

SlickMenu.open

Open a menu

Usage

SlickMenu.open(menu_id, callback)

Arguments

Param Type Details
menu_id interger

WordPress Slick Menu ID

callback function()

On complete callback function

SlickMenu.openSubLevel

Open a menu sub level

Usage

SlickMenu.openSubLevel(menu_id, menu_item_id, callback)

Arguments

Param Type Details
menu_id interger

WordPress Slick Menu ID

menu_item_id interger

WordPress Slick Menu Item ID

callback function()

On complete callback function

SlickMenu.close

Close a menu

Usage

SlickMenu.close(menu_id, callback)

Arguments

Param Type Details
menu_id interger

WordPress Slick Menu ID

callback function()

On complete callback function

SlickMenu.isOpen

Check if a menu is already open

Usage

SlickMenu.isOpen(menu_id)

Arguments

Param Type Details
menu_id interger

WordPress Slick Menu ID

Returns

boolean

Returns true if the menu is open or false if it is closed

SlickMenu.get

Get menu DOM element

Usage

SlickMenu.get(menu_id)

Arguments

Param Type Details
menu_id interger

WordPress Slick Menu ID

Returns

object

Returns Menu DOM Element or NULL if menu not found

SlickMenu.getOpen

Get currently opened menu ID

Usage

SlickMenu.getOpen()

Arguments

No arguments

Returns

integer

Returns WordPress Slick Menu ID or NULL if no menu is currently open

SlickMenu.getCurrentLevel

Get menu active level if the menu is open

Usage

SlickMenu.getCurrentLevel(menu_id)

Arguments

Param Type Details
menu_id interger

WordPress Slick Menu ID

Returns

object

Return menu level DOM Element

SlickMenu.getCurrentLevelDepth

Get menu active level depth if the menu is open

Usage

SlickMenu.getCurrentLevelDepth(menu_id)

Arguments

Param Type Details
menu_id interger

WordPress Slick Menu ID

Returns

integer

Return menu level depth

SlickMenu.isCreated

If the menu is set to be loaded on demand via AJAX, this will check if the menu has already been created

Usage

SlickMenu.isCreated(menu_id)

Arguments

Param Type Details
menu_id interger

WordPress Slick Menu ID

Returns

boolean

Returns true if the menu has been created or false if not

SlickMenu.reload

Reload a menu via ajax

Usage

SlickMenu.reload(menu_id, callback)

Arguments

Param Type Details
menu_id interger

WordPress Slick Menu ID

callback function()

On complete callback function

SlickMenu.getAlwaysVisible

Get always visible menu ID

Usage

SlickMenu.getAlwaysVisible()

Arguments

No arguments

Returns

integer

Returns WordPress Slick Menu ID or NULL if no menu is set to be always visible

SlickMenu.alwaysVisibleEnabled

Check if one of the menus is set to be always visible

Usage

SlickMenu.alwaysVisibleEnabled()

Arguments

No arguments

Returns

boolean

Returns true if one of the menus is set to be always visible or false if not

SlickMenu.isAlwaysVisible

Check if a menu is already is always visible

Usage

SlickMenu.isAlwaysVisible(menu_id)

Arguments

Param Type Details
menu_id interger

WordPress Slick Menu ID

Returns

boolean

Returns true if the menu is set to be always visible or false if not

SlickMenu.getOption

Get menu option value by key

Usage

SlickMenu.getOption(menu_id, key)

Arguments

Param Type Details
menu_id interger

WordPress Slick Menu ID

key string

WordPress Menu Term Meta Key

Returns

mix

Returns menu option value

Back To Top