Life Ring Button


This JS API provides you access to the new Life Ring Button tool. Access methods on this object:




Expands the Life Ring Button. It can receive an options object, see this example:{
	focus: { 
		articleId: 12345 // it will open the Life Ring Button focused to the particular article


Closes the Life Ring Button.


Returns true if the Life Ring Button is opened, false if it is not.


Hides the whole button widget - the launcher button and the popup.


Shows the previously hidden button widget - the launcher button and the popup.


Attaches the Life Ring to a custom element in your application. It automatically hides the default launcher button. The argument must be an element instance, not a CSS selector.

If you call only this function, the built-in launcher can be displayed for a second under some circumstances. To prevent the built-in launcher from being visible completely, use the hideInAppCenterLauncher configuration option set to true with the init script, as described here.

listen(event, callback)

Listens to a Life Ring Button event and calls the callback. Supported events are closed - this event is triggered when the Life Ring Button is closed; opened - triggered when the modal is opened.