Nedved--
---
You received this message because you are subscribed to the Google Groups "Google AdMob Ads Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-admob-ads...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport" content="user-scalable=no, width=device-width,initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0"/>
<script type="text/javascript" src="mraid.js"></script>
<style type="text/css">
html, body {
margin: 0;
padding: 0;
}
.banner, .overlayBanner {
display: block;
position: absolute;
top: 0px;
left: 0px;
z-index: 1000;
overflow: hidden;
}
.banner {
background-color: orange;
width: 300px;
height: 50px;
}
.overlayBanner {
background-color: green;
display: none;
width: 300px;
height: 250px;
}
</style>
<script type="text/javascript">
// Check to see if document is ready
//mraid.setExpandProperties({'useCustomClose':true});
mraid.useCustomClose(true);
if ((mraid.getState() != "default") || (mraid.getState() != "ready")) {
// console.log("Document is not ready, adding event listener");
// Register event listener to keep track of state changes
mraid.addEventListener("stateChange", handleStateChanges);
} else {
// console.log("Document is ready");
// Register event listener to keep track of state changes
mraid.addEventListener("stateChange", handleStateChanges);
handleStateChanges();
}
function handleStateChanges() {
// console.log('mraid state: ' + mraid.getState());
// Perform action on state change
switch(mraid.getState()) {
case "expanded":
// console.log("handleStateChanges, expanded");
// Show the overlay banner when view is in "expanded" state
expand();
break;
case "default":
// console.log("handleStateChanges, default");
// Show the initial banner when view is in "default" state
close();
break;
}
}
function expand() {
document.getElementById('banner').style.display = 'none';
document.getElementById('overlayBanner').style.display = 'block';
}
function close() {
document.getElementById('overlayBanner').style.display = 'none';
document.getElementById('banner').style.display = 'block';
}
</script>
</head>
<body>
<div id='banner' class='banner' onClick='mraid.expand()'></div>
<div id='overlayBanner' class='overlayBanner' onClick='mraid.open("%%CLICK_URL_ESC%%http://www.google.com")'></div>
</body>
</html>
To unsubscribe from this group and stop receiving emails from it, send an email to google-admob-ads-sdk+unsub...@googlegroups.com.
--
---
You received this message because you are subscribed to the Google Groups "Google AdMob Ads Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-admob-ads...@googlegroups.com.
--
---
You received this message because you are subscribed to a topic in the Google Groups "Google AdMob Ads Developers" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/google-admob-ads-sdk/pLvz2Yup2VE/unsubscribe.
To unsubscribe from this group and all its topics, send an email to google-admob-ads...@googlegroups.com.