Skip to main content
Requires usertour.js 0.0.20 or later.
The toggleResourceCenter() method flips the resource center between its open and collapsed states. If the panel is open, it will be collapsed back to the launcher; if it is collapsed, it will be opened. If no resource center is currently active for the user, the call has no effect.

Parameters

None.

Returns

void

Example

// Wire a keyboard shortcut to toggle the resource center
document.addEventListener('keydown', (event) => {
  if (event.key === '?' && event.shiftKey) {
    usertour.toggleResourceCenter();
  }
});
Make sure to call init() before using any other Usertour.js methods.