forked from pickhardt/Guiders-JS
-
Notifications
You must be signed in to change notification settings - Fork 0
/
README.html
125 lines (115 loc) · 4.93 KB
/
README.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
<html>
<head>
<style type="text/css">
body {
margin: 0;
padding: 0;
}
#clock {
position: absolute;
top: 300px;
left: 250px;
}
.stopper {
color: #777;
font-size: 77%;
}
</style>
<!-- guiders.js requires jQuery as a prerequisite. Be sure to load guiders.js AFTER jQuery. -->
<script type="text/javascript" src="jquery-1.5.1.min.js"></script>
<script type="text/javascript" src="guiders-1.2.0.js"></script>
<link rel="stylesheet" href="guiders-1.2.0.css" type="text/css" />
</head>
<body>
<span id="clock" style="border: 2px solid #333; width: 300px; height: 200px; text-align: center;" onclick="guiders.next();">
<br />
<img src="clock.gif" width=150 height=150 />
</span>
<script type="text/javascript">
/**
* Guiders are created with guiders.createGuider({settings}).
*
* You can show a guider with the .show() method immediately
* after creating it, or with guiders.show(id) and the guider's id.
*
* guiders.next() will advance to the next guider, and
* guiders.hideAll() will hide all guiders.
*
* By default, a button named "Next" will have guiders.next as
* its onclick handler. A button named "Close" will have
* its onclick handler set to guiders.hideAll. onclick handlers
* can be customized too.
*/
guiders.createGuider({
buttons: [{name: "Next"}],
description: "Guiders are a user interface design pattern for introducing features of software. This dialog box, for example, is the first in a series of guiders that together make up a guide.",
id: "first",
next: "second",
overlay: true,
title: "Welcome to Guiders.js!"
}).show();
/**
* .show() means that this guider will get shown immediately after creation.
*
* Using .show() is one way of starting your guiders.
*
* Another way is by directing the user to a special URL with the guider id in
* its hash tag, such as:
*
* http://www.local.com/README.html#guider=first
*
* This makes it easy to only show guiders for new users. It can also be used
* to route people among multiple web pages and still keep showing the guiders.
*/
guiders.createGuider({
attachTo: "#clock",
buttons: [{name: "Close"},
{name: "Next"}],
description: "For example, this guider is attached to the 12 o'clock direction relative to the attached element. The Guiders.js API uses a clock model to determine where the guider should be placed.<br/><br/>Attaching a guider to an element focuses user on the area of interest.",
id: "second",
next: "third",
position: 12,
title: "Guiders are typically attached to an element on the page."
});
guiders.createGuider({
attachTo: "#clock",
buttons: [{name: "Close, then click on the clock.", onclick: guiders.hideAll}],
description: "Custom event handlers can be used to hide and show guiders. This allows you to interactively show the user how to use your software by having them complete steps. To try it, click on the clock.",
id: "third",
next: "fourth",
position: 2,
title: "You can advance guiders from custom event handlers.",
width: 500
});
guiders.createGuider({
attachTo: "#clock",
buttons: [{name: "Exit Guide", onclick: guiders.hideAll},
{name: "Continue", onclick: guiders.next}],
buttonCustomHTML: "<input type=\"checkbox\" id=\"stop_showing\" /><label for=\"stop_showing\" class=\"stopper\">Stop showing these. (Not implemented)</label>",
description: "Other aspects of the guider can be customized as well, such as the button names, button onclick handlers, and dialog widths. You'd also want to modify the CSS to your own project's style.",
id: "fourth",
next: "fifth",
position: 7,
title: "Guiders can be customized.",
width: 600
});
guiders.createGuider({
buttons: [{name: "Next"}],
description: "Guiders can also be used to introduce of brand new features to existing users. Here is an example of a guider in Gmail. Google's CSS calls this a promo, likely short for promotional box. <br/><br/> <img src=\"promo_gmail.png\" style=\"border: 1px solid #333;\" />",
id: "fifth",
next: "finally",
overlay: true,
title: "How else can I use guiders?",
width: 550
});
guiders.createGuider({
buttons: [{name: "Close", classString: "primary-button"}],
description: "To get started, have a look at this HTML file, then emulate it for use in your own project. You can also see Guiders in action on our site, <a href=\"http://www.optimizely.com/guiders\">www.optimizely.com</a>",
id: "finally",
overlay: true,
title: "Great, so how do I get started?",
width: 500
});
</script>
</body>
</html>