forked from EragonJ/Trip.js
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
166 lines (163 loc) · 8.81 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
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
<!DOCTYPE html><!--[if lt IE 7]><html lang="en" class="no-js lt-ie9 lt-ie8 lt-ie7"></html><![endif]--><!--[if IE 7]><html lang="en" class="no-js lt-ie9 lt-ie8"></html><![endif]--><!--[if IE 8]><html lang="en" class="no-js lt-ie9"></html><![endif]--><!--[if gt IE 8]><!--><html lang="en" class="no-js"><!--<![endif]--><head><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"><title>Trip.js </title><meta name="description" content=""><meta name="viewport" content="width=device-width"><link rel="stylesheet" href="public/vendor/bootstrap/css/bootstrap.min.css"><link rel="stylesheet" href="public/css/index.css"><!-- include trip CSS--><link rel="stylesheet" href="./src/trip.css"><style type="text/css">.wrapper div:nth-child(odd) {
background : #AAA;
}
.wrapper div:nth-child(even) {
background : #DDD;
}</style><script src="public/vendor/modernizr-2.6.2.min.js"></script><script src="public/vendor/jquery-1.8.3.min.js"></script><script src="public/vendor/bootstrap/js/bootstrap.min.js"></script><script src="./src/trip.min.js"></script><script>(function(d, s, id) {
var js, fjs = d.getElementsByTagName(s)[0];
if (d.getElementById(id)) return;
js = d.createElement(s); js.id = id;
js.src = "//connect.facebook.net/en_US/all.js#xfbml=1&appId=491695290890106";
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));</script><script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");
</script><script>$(document).ready(function() {
var trip = new Trip([
{
sel : $('.step1'),
position : 'n',
content : 'Hi, I am Trip.js',
delay : 2000
},
{
sel : $('.step2'),
position : 'e',
content : 'This is a plugin that can help you make hint flow easily !',
delay : 3000
},
{
sel : $('.step3'),
position : 'n',
content : 'Can be placed in many directinos - North',
delay : 2000
},
{
sel : $('.step4'),
position : 'e',
content : 'East',
delay : 2000
},
{
sel : $('.step5'),
position : 'w',
content : 'West',
delay : 2000
},
{
sel : $('.step6'),
position : 's',
content : 'South',
delay : 2000
},
{
sel : $('.step7'),
position : 'n',
content : 'One more thing, plz read this !',
expose : true,
delay : 7000
}
], {
onTripStart : function() {
console.log("onTripStart");
},
onTripEnd : function() {
console.log("onTripEnd");
},
onTripStop : function() {
console.log("onTripStop");
},
backToTopWhenEnded : true,
delay : 2000
});
$(".start-tour").click(function() {
trip.start();
});
window.trip = trip;
});
</script></head><body><div id="fb-root"> </div><a href="https://github.com/EragonJ/Trip.js"> <img style="position: absolute; top: 0; right: 0; border: 0;" src="https://s3.amazonaws.com/github/ribbons/forkme_right_gray_6d6d6d.png" alt="Fork me on GitHub"></a><div class="container"><div class="navbar"><div class="navbar-inner"><a href="#" class="brand">Trip.js</a><ul class="nav"><li class="active"> <a href="#">Home</a></li><li> <a href="#" class="start-tour">Start a Demo Tour</a></li><li> <a href="https://github.com/EragonJ/Trip.js">Github</a></li></ul><ul class="nav pull-right"><li><a href="http://github.com/EragonJ">By EragonJ</a></li></ul></div></div><div class="jumbotron"><h1 class="step1">Trip.js</h1></div><div class="social-buttons clearfix"><div data-href="http://eragonj.github.com/Trip.js/" data-send="false" data-layout="button_count" data-width="450" data-show-faces="false" class="fb-like"></div><div class="twitter"><a href="https://twitter.com/share" data-hashtags="trip.js" class="twitter-share-button">Tweet</a></div><div class="github"><iframe src="http://ghbtns.com/github-btn.html?user=EragonJ&repo=Trip.js&type=watch&count=true" allowtransparency="true" frameborder="0" scrolling="0" width="152" height="20"></iframe></div></div><div class="steps"><div class="step"><h2><span class="step2">What is Trip.js ?</span></h2><p>Trip.js is a useful plugin that can help you customize a tutorial trip easily. ( Based on jQuery )</p></div><div class="step"><h2>Setup ( Minimal )</h2><ol> <li>Include jQuery ( has to check version later )<pre><script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script></pre></li><li>Include src/trip.css<pre><link type="text/css" rel="stylesheet" href="src/trip.css"></pre></li><li>Include src/trip.js<pre><script type="text/javascript" src="src/trip.js"></script></pre></li><li>Setup Trip.js<pre class="step3 step4 step5 step6">var trip = new Trip([
{
sel : $('#element1'),
content : 'This is element 1'
},
{
sel : $('#element2'),
content : 'This is element 2'
}
], options); // details about options are listed below</pre></li><li>Take a Trip Now !<pre>$(document).ready(function({
trip.start();
});</pre></li></ol></div><div class="step"> <h2>Setup for Demo Tour</h2><pre>$(document).ready(function() {
var trip = new Trip([
{
sel : $('.step1'),
position : 'n',
content : 'Hi, I am Trip.js',
delay : 2000
},
{
sel : $('.step2'),
position : 'e',
content : 'This is a plugin that can help you make hint flow easily !',
delay : 3000
},
{
sel : $('.step3'),
position : 'n',
content : 'Can be placed in many directinos - North',
delay : 2000
},
{
sel : $('.step4'),
position : 'e',
content : 'East',
delay : 2000
},
{
sel : $('.step5'),
position : 'w',
content : 'West',
delay : 2000
},
{
sel : $('.step6'),
position : 's',
content : 'South',
delay : 2000
},
{
sel : $('.step7'),
position : 'n',
content : 'One more thing, plz read this !',
expose : true,
delay : 7000
}
], {
onTripStart : function() {
console.log("onTripStart");
},
onTripEnd : function() {
console.log("onTripEnd");
},
onTripStop : function() {
console.log("onTripStop");
},
backToTopWhenEnded : true,
delay : 2000
});
$(".start-tour").click(function() {
trip.start();
});
});</pre></div><div class="step"><h2>Options</h2><ul> <li> <h4>tripIndex</h4><p>You can set tripIndex ( start from 0 ) to specific trip block at start.</p><p>
Default : <code>
$.noop</code></p></li><li> <h4>onTripStart </h4><p>You can set a callback function triggered when the trip starts.</p><p>
Default : <code>
$.noop</code></p></li><li> <h4>onTripEnd</h4><p>You can set a callback function triggered when the trip ends.</p><p>
Default : <code>
$.noop</code></p></li><li> <h4>backToTopWhenEnded</h4><p>You can ask Trip.js go back to top when ended.</p><p>
Default : <code>
false</code></p></li><li> <h4>overlayZindex</h4><p>You can set the basic zIndex for overlay if you want to expose elements.</p><p>
Default : <code>
99999</code></p></li><li> <h4>delayPeriod</h4><p>every trip will be lived for 1 second (1000 ms) by default</p><p>
Default : <code>
1000</code></p></li></ul></div><div class="step"> <h2>Key Binding</h2><ul><li> <h4>Right and Down arrows</h4><p>Go to next trip</p></li><li> <h4>Left and Up arrows</h4><p>Go back to previous trip</p></li><li> <h4>Space</h4><p>pause / continue</p></li><li> <h4>Esc</h4><p>Stop</p></li></ul></div><div class="step"><h2>API</h2><ul> <li> <h4>trip.start()</h4><p>Call this method to start your trip</p></li><li><h4>trip.stop()</h4><p>Call this method to stop your trip</p></li><li><h4>trip.pause()</h4><p>Call this method to pause/continue your trip</p></li></ul></div><div class="step step7"><h2>Notice</h2><p>
This plugin is still under development !
If you find any bugs or want me to implement anything,
please feel free to open an issue ;)</p><p><a href="https://github.com/EragonJ/Trip.js/issues">Open an issue</a></p></div></div></div></body></html>