When entering the page, the user sees the initial collapsed banner. Transition to the expanded banner can be carried out on a click or on mouseover on the initial banner. When unfolding, the screenshot of the content moves to any of the four sides (right, left, up, down), opening the expanded banner.
A container with Takeover animation can only use part of the site content, for example, central, without side columns. In this case, for the container, the necessary dimensions and position are specified, and the animation will only work for the specified part.
Desktop | Tablet | Phone | |||
---|---|---|---|---|---|
Windows | Mac | iOS | Android | iOS | Android |
Chrome, Firefox | Safari9+, Chrome, Firefox | – | – | – | – |
Standard dimensions, WxH, px: 300х250, 240х350, 240х400, 180х150, 320х280, 728х90, 970х90, 970х200, 650х250, 240×500, 300х600, 160х600
User-initiated (off by default)
“X Close” button in the upper right corner of the expanded panel (allows user to close the expanded stage)
Banner with all banner assets should be archived as a .zip file. Use a .zip file with the template.
The HTML file must define all used sources (libraries, images, etc). A recommended file name is body.html.
globalHTML5Api connects automatically, requested using the following method:
All used modules should be listed as function parameters. Two and more modules should be comma-separated. In this format, the Player module may be used.
A simplified example of the globalHTML5Api.init usage for the Takeover format:
Key | Parameters | Properties | Type | Description | ||
---|---|---|---|---|---|---|
resize(options) | – | – | – | globalHTML5Api.resize initialization | ||
options | – | Array | An array of objects with properties. Each object presents the container state (resizeState) | |||
name (required) | String | Object (state) name | ||||
width (required) | String|Number | Banner container width | ||||
height (required) | String|Number | Banner container height | ||||
fixed | – | Object | Object with properties. Describes the content overlay by the banner container | |||
vertical (required) | center | String | The vertical alignment of the container | |||
horizontal (required) | center | String | The horizontal alignment of the container | |||
onComplete | Function | Callback function running upon completion of globalHTML5Api.init.resize.to(this.name) | ||||
onStart | Function | Callback function running upon starting of globalHTML5Api.init.resize.to(this.name) |
Method | Parameters | Type | Description |
---|---|---|---|
to(resizeStateName, time, eventName) | – | – | Changing the current container state to indicated one |
resizeStateName (required) | String | Container state to which the current one should be switched to | |
time (required) | Number | Time for the container state-changing animation | |
eventName (required) | String | Events for tracking:
|
|
currentState() | – | – | The method returns the string: resizeState.name – current container state name; interactive to resizeState.name – changing the container state to the indicated one. |
A simplified example of using the Takeover module can be found below (click to expand).
Methods | Parameters | Properties | Type | Description | ||
---|---|---|---|---|---|---|
create() | – | – | – | Takeover initialization | ||
container(HTMLElement) | – | – | – | Method to append the Takeover to an indicated container | ||
HTMLElement | – | String | HTML element with Takeover layout | |||
show(“slide”, options) | – | – | – | The method starts the takeover animation | ||
slide | – | String | Takeover animation type | |||
options | – | Object | An object with properties | |||
target (required) | left, right, top, bottom | String | The direction of the screen content screenshot shift | |||
time (required) | Number | The time for which takeover animation is displayed; in seconds | ||||
onStart (optional) | Function | Calling the function at the start of a takeover animation | ||||
onComplete (optional) | Function | Calling the function on completion of a takeover animation | ||||
hide(timeScale) | – | – | – | The method starts the takeover animation backward | ||
timeScale (optional) | – | Number | The value acts as a multiplier for time, accelerates or slows down the animation while minimizing takeover |
|||
on(“ready”, callback) | – | – | – | The method allows you to call functions on the readiness of the screenshot of the site content | ||
ready | – | String | An event that occurs when a screenshot of the site is ready | |||
callback | – | Function | Function, which starts by the availability of the screenshot of the site |
Methods | Arguments | Type | Description |
---|---|---|---|
click(URL) | – | – | Method to call the clickthrough. Target URL may be set as a parameter or from the user interface. The URL set in the code has a higher priority than the URL set from the UI, which can lead to a conflict. Therefore, it is mandatory to use only one of the available methods. |
URL (optional) | String | Target URL | |
src(URL) | – | – | The method returns the absolute path to file |
URL (optional) | String | Relative path to file |
In case the creative contains video, follow the Instruction for the Video player module.
Supported file types: .jpg, .png, .gif, .svg
The format will not work correctly if it was posted on the site in Safe Frame.