Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/pickhardt/Guiders-JS
Guiders.js: A Javascript library for guiders.
https://github.com/pickhardt/Guiders-JS
Last synced: about 1 month ago
JSON representation
Guiders.js: A Javascript library for guiders.
- Host: GitHub
- URL: https://github.com/pickhardt/Guiders-JS
- Owner: pickhardt
- Created: 2011-06-03T21:02:07.000Z (over 13 years ago)
- Default Branch: master
- Last Pushed: 2022-05-05T01:36:49.000Z (over 2 years ago)
- Last Synced: 2024-10-15T04:40:50.780Z (2 months ago)
- Language: JavaScript
- Homepage:
- Size: 337 KB
- Stars: 1,656
- Watchers: 41
- Forks: 183
- Open Issues: 20
-
Metadata Files:
- Readme: README.html
Awesome Lists containing this project
README
body {
margin: 0;
padding: 0;
}.guider_description a, .guider_description a:visited {
color: #1054AA;
}#clock {
border: 2px solid #333;
height: 200px;
margin-left: 100px;
position: relative;
text-align: center;
width: 300px;
}
.stopper {
color: #777;
font-size: 77%;
}
Guiders are typically attached to an element on the page.
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.
Attaching a guider to an element focuses user on the area of interest.
/**
* 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.
*
* An alternate method for creating guiders is to create them in the
* HTML, then call $("#guider3").guider(options);
*/
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: "guider1",
next: "guider2",
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.
*/
// Alternate method of creating guiders allows you to keep the buttons and description in the HTML:
$("#guider2").guider({
next: "guider3"
});
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: "guider3",
next: "guider4",
position: 3,
title: "You can advance guiders from custom event handlers.",
width: 500
});
guiders.createGuider({
attachTo: "#clock",
buttons: [{name: "Exit Guide", onclick: guiders.hideAll},
{name: "Back"},
{name: "Continue", onclick: guiders.next}],
buttonCustomHTML: "<input type=\"checkbox\" id=\"stop_showing\" /><label for=\"stop_showing\" class=\"stopper\">Optional checkbox. (You can add one.)</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: "guider4",
next: "guider5",
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: "guider5",
next: "guider6",
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. Enjoy!",
id: "guider6",
overlay: true,
title: "Great, so how do I get started?",
width: 500
});