The WalkMe Player API can be used to toggle the Player Menu open or closed without the need of clicking on the WalkMe Widget. This can be useful if you want to assign another element to toggle the menu. Using WalkMePlayerAPI.isMenuOpen()
to check the status of the menu before calling the toggle API is best practice when attempting to use the API to only open or close the menu.
WalkMePlayerAPI Functions | |
---|---|
WalkMePlayerAPI.isMenuOpen()
|
Returns boolean indicating whether the WalkMe Player Menu is currently opened. |
WalkMePlayerAPI.toggleMenu()
|
Toggle the WalkMe Player Menu. |
// Check that the menu is closed before toggling
if (WalkMePlayerAPI.isMenuOpen() == false) {
WalkMePlayerAPI.toggleMenu();
}