-
Notifications
You must be signed in to change notification settings - Fork 15
/
index.html
87 lines (80 loc) · 2.45 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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Building And Testing of our product-tour</title>
<link rel="stylesheet" href="css/product-tour.css">
</head>
<body>
<div class="item" id="first">
<h1>#1</h1>
</div>
<div class="item" id="fourth">
<h1>#4</h1>
</div>
<div class="item" id="third">
<h1>#3</h1>
</div>
<div class="item" id="second">
<h1>#2</h1>
</div>
<style>
.item{
width: 100%;
height: 200px;
background-color: yellow;
margin: 5px;
}
div.item:nth-child(odd) {
background-color: yellow;
}
div.item:nth-child(even) {
background-color: blue;
}
</style>
<!-- Main Vendors -->
<script src="bower_components/jquery/dist/jquery.min.js"></script>
<!-- / Main Vendors -->
<script src="js/product-tour.js"></script>
<script>
//initialize constructor
var productTour = new ProductTour({
overlay:true,
onStart: function () {
console.log("tour Started");
},
onChanged:function (e) {
console.log("Return Value",e);
},
onClosed:function (e) {
console.log("Return Value For On Close",e);
}
});
//can only be called once
productTour.steps([{//pass an array of tour steps
element: '#first',//specify the target element #search or .header
title: 'Tour',
content: 'This is the first section #1',
image: 'images/sample.jpg'//specify image to be shown on mobile view
},{//pass an array of tour steps
element: '#second',//specify the target element #search or .header
content: 'The second section #2',
image: 'images/sample.jpg',//specify image to be shown on mobile view
position: 'bottom'//top, bottom, right, left
},{//pass an array of tour steps
element: '#third',//specify the target element #search or .header
title: 'Tour',
image: 'images/sample.jpg',
content: 'This is the third section Step #3',
position: 'top'//top, bottom, right, left
},{//pass an array of tour steps
element: '#fourth',//specify the target element #search or .header
title: 'Tour',
content: 'This is the forth and final section... yay. #4',
image: 'images/sample.jpg',//specify image to be shown on mobile view
position: 'left'//top, bottom, right, left
}]);
productTour.startTour();//initialize the tour
</script>
</body>
</html>