31.07.2013 Views

Build Guide

Build Guide

Build Guide

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

.3.. s4m_demo.css, s4m_demo.js<br />

These are required CSS and JS for this demo which contain all of the actual content which will be pulled into the<br />

container within the HTML page<br />

<br />

<br />

<br />

.4.. thumb_1.png, thumb_2.png, thumb_3.png, thumb_4.png<br />

These are the thumbnail images which are pulled into the Swipe for More curtain.<br />

.5.. image_1.png, image_2.png, image_3.png, image_4.png<br />

These are the large images which are shown when the thumbnails within the swipe for more curtain are pressed.<br />

.6.. tab.png. grip.png<br />

These are the images which make up the Swipe for More curtain.<br />

.7.. background_image.jpg<br />

This is the backup image for the creative which will display if the creative is viewed by a non HTML5 compliant<br />

browser. It should be the size of the creative, so in this case 300x250px<br />

.Using the Component.<br />

.>. Configuration<br />

The goal of this mobile component is to be as flexible as possible especially around its configuration. In order to set<br />

it up a config object is created in JavaScript (shown below) and then passed to the component.<br />

.NOTE:. This config for the demo downloadable from this document is done within the s4m_demo.js file.<br />

// Swipe For More config object.<br />

var config = {<br />

// Id of div container that will hold the Swipe 4 More component.<br />

adContainerId: 'swipe-container',<br />

// File path of the swipeable tab image.<br />

outerTabFilepath: Enabler.getUrl('tab.png'),<br />

// Dimensions of the outer swipeable tab image.<br />

outerTabDimensions: {<br />

width: 300,<br />

height: 37<br />

},<br />

// Amount of space to increase the tab swipe hit area by in pixels.<br />

tabHitAreaIncrease: 15,<br />

// File path of the inner tab image that appears inside the swipe pane.<br />

innerTabFilepath: Enabler.getUrl('grip.png'),<br />

// Dimensions of the inner tab image.<br />

innerTabDimensions: {<br />

width: 47,<br />

height: 17<br />

},<br />

// Because the outer tab and inner images differ, there could be an

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!