-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
53 lines (42 loc) · 1.41 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" type="text/css" href="./vicinity.css">
<script type="text/javascript" src="./jquery.min.js"></script>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<!-- Only needed for demo -->
<script type="text/javascript">
var displayResults = function(result) {
$('#lat').html(result.lat);
$('#lng').html(result.lng);
$('#currentScreensize').html(result.screenSize);
$('#orientation').html(result.orientation);
console.log(result);
};
</script>
</head>
<body>
<section>
Screen size: <span id="currentScreensize"></span>, Orientation: <span id="orientation"></span>, LatxLng: <span id="lat"></span>x<span id="lng"></span>
</section>
<div id="sticky" class="banner-sticky" style="position: fixed;">
</div>
<script type="text/javascript" src="./vicinity.js"></script>
<script type="text/javascript">
var pubReference = 34;
var sessionId = "abcd123"; // possibly get from a cookie?
new Vicinity (pubReference, sessionId, function(result) {
// success function
$(function() {
$("#ad").html(result.ad.getBannerHtml());
})
}, function(result) {
// error function
$(function() {
console.log('error');
console.log(result);
})
});
</script>
</body>
</html>