By default HelpShelf loads when the page loads and from there, the widget is opened, closed and generally interacted with based on user interaction. However, from time to time you may find it helpful to trigger key actions (such as showing or hiding the HelpShelf widget) via a JavaScript method.
The following methods are supported:
By default the HelpShelf widget is opened when a user clicks the icon. To open it on demand, use the method below.
HelpShelfLoader.showHelpShelf();
To manually close the HelpShelf Widget (rather than wait for the user to press the X icon), use the method below:
HelpShelfLoader.closeHelpShelf();
If you'd like to open the Helpdesk / Contact provider you have linked to your HelpShelf widget, use the method below. For instance, if you have setup Intercom as your Helpdesk provider, then by default we will display it to the user when they press the 'Contact' button within your widget. With this method you can manually make it visible and available to the user.
HelpShelfLoader.showHelpDesk();
If you'd like to hide the HelpShelf button, use the method below. Please note however, that if it is hidden your website users will not be able to open it or invoke your Helpdesk / contact provider.
HelpShelfLoader.showHelpShelfBtn();
If needed, you can hide the HelpShelf button by using the method below.
HelpShelfLoader.hideHelpShelfBtn();
If needed, you can destroy (clear out) the entire HelpShelf widget by using the method below.
HelpShelfLoader.destroy();
If you have destroyed the HelpShelf widget (see above destroy method) and need to re-start the widget, call the method below.
HelpShelfLoader.start();
The above methods can either be encapsulated within your own JavaScript method or event, such as:
$("#my-element").on("click", function() {
HelpShelfLoader.showHelpShelf();
});
Or they can be triggered directly from an anchor element, such as:
<a href="javascript: HelpShelfLoader.showHelpShelf();">Open HelpShelf</a>
Our team is ready to support you with any inquiries you may have. We're just a message away!