When entering the page, a user sees the initially collapsed banner. Transition to the expanded banner can be carried out with a click or on the mouse-over. When unfolding, the screenshot of the content “cuts up” into two parts (an “open doors” effect), revealing an expanded banner.
A container with Takeover animation may use only a 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 collapse the expanded state)
Banner with all banner assets should be archived as a .zip file. It is recommended to 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 and Takeover modules 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 container position relatively to the browser window | |||
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).
Method | Parameters | Properties | Type | Description | ||
---|---|---|---|---|---|---|
create() | – | – | – | Takeover initialization | ||
container(HTMLElement) | – | – | – | A method that adds Takeover to the specified container | ||
HTMLElement | – | String | HTML element with the Takeover layout | |||
show(“cut”, options) | – | – | – | The method starts Takeover animation | ||
cut | – | String | Takeover animation type | |||
options | – | Object | An object with properties | |||
target (required) | horizontal, vertical | String | Plane in which the screensot “cuts up” | |||
time (required) | Number | The time for which Takeover animation is performed; sec | ||||
degree (required) | Number | An angle of the screenshot’s turn | ||||
onStart (optional) | Function | Calling the function at the start of the Takeover animation | ||||
onComplete (optional) | Function | Calling the function at the completion of the Takeover animation | ||||
hide(timeScale) | – | – | – | The method starts the Takeover animation in the opposite direction | ||
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 | Event that occurs when a screenshot of the site is available | |||
callback | – | Function | The function, which starts when the screenshot of the site is available |
Method | 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) | – | – | Method returns the absolute path to file |
URL (optional) | String | Relative path to file |
In case the creative contains video, see the Video player module page.
Supported file types: .jpg, .png, .gif, .svg