onAfterOpen ( data )

Following the opening of chat widget for Pop-Up and Slider types. Activates upon the finishing of the opening process animation.

The data object is passed as an argument, containing the following properties:

PropertyTypeDescription
byUser bool "true" if the widget opening was initiated by the user (clicking on the label or the button) and "false" if the chat window was opened automatically (for instance, through a new message)

This event doesn't alllow preventing the widget opening.

If you want to additionally regulate the opening possibility, make use of the onOpen() event.

Examples

  1. via jQuery
    $(document).on("netroxafteropen", function(event, data) {
        // Actions upon chat window opening
    });       
  2. Using the nsc_API object
    nsc_API = { /* ... */ };
    
    nsc_API.onAfterOpen = function(data) {
        // Actions upon chat window opening
    };        

All rights reserved. Copyright © 2017 Netrox SC
Host CMS