PRODUCT
Follow

Note

Note: To view the full list of events, see AdKit: Event Registration Methods.

adkit.onVisibilityChanged(visibilityChangeCB) Event

Description

Subscribes to receive changes in the ad visibility state.

Example

adkit.onReady(function() {
    adkit.onVisibilityChanged(function(visibilityInfo) {
        if (visibilityInfo.percentage > 50) {
            // Do something 
        }
    });
});

Parameters

Name

Mandatory/Optional

Type

Description

visibility Changed Inline Callback

Mandatory

Function

Runs when the ad visibility state changes.

visibilityChangeCB Function Parameters

Name

Mandatory/Optional

Type

Description

visbilityInfo

Optional

Object

Contains the visibility change-event properties.

visibilityInfo Object Parameters

Name

Mandatory/Optional

Type

Description

percentage

Mandatory

Number

Percentage of the ad's area that is visible.

Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request

Comments