Skip to content

Commit c58b267

Browse files
committed
Update README.md
1 parent f9f6af0 commit c58b267

File tree

1 file changed

+11
-19
lines changed

1 file changed

+11
-19
lines changed

README.md

Lines changed: 11 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,9 @@ EnjoyHint
44

55
EnjoyHint is free software distributed under the terms of MIT license.
66

7-
Check out this [issue tracker demo with EnjoyHint](http://xbsoftware.com/products/enjoyhint/) and a [TODO app demo](http://xbsoftware.github.io/enjoyhint/) ([downloadable package](http://xbsoftware.github.io/enjoyhint/enjoyhint_todo_demo.zip))
7+
#### Demos
8+
[TODO app demo](http://xbsoftware.github.io/enjoyhint/) ([downloadable package](http://xbsoftware.github.io/enjoyhint/enjoyhint_todo_demo.zip))
9+
[A small guide on EnjoyHint](http://xbsoftware.github.io/enjoyhint/example1.html)
810

911
#### Dependencies
1012
EnjoyHint require the following plugins and libs:
@@ -37,17 +39,15 @@ var enjoyhint_instance = new EnjoyHint({});
3739
//hide EnjoyHint after a click on the button.
3840
var enjoyhint_script_steps = [
3941
{
40-
selector:'.new_btn',//jquery selector
41-
event:'click',
42-
description:'Click the "New" button to start creating your project'
42+
"click .new_btn" : 'Click the "New" button to start creating your project'
4343
}
4444
];
4545

4646
//set script config
47-
enjoyhint_instance.setScript(enjoyhint_script_steps);
47+
enjoyhint_instance.set(enjoyhint_script_steps);
4848

4949
//run Enjoyhint script
50-
enjoyhint_instance.runScript();
50+
enjoyhint_instance.run();
5151
```
5252

5353
#### Script Configuration
@@ -58,32 +58,24 @@ Highlight some button and after you click on it, highlight some panel:
5858
```javascript
5959
var enjoyhint_script_steps = [
6060
{
61-
selector: '.some_btn',//jquery selector
62-
event: 'click',
63-
description: 'Click on this btn'
61+
"click .some_btn" : 'Click on this btn'
6462
},
6563
{
66-
selector: '.some_panel',//jquery selector
67-
event: 'click',
68-
description: 'Click on this panel'
64+
"click .some_panel" : 'Click on this panel'
6965
}
7066
];
7167
```
7268

7369
#### Properties of the step configuration
74-
* `selector` - jquery selector of the DOM-element, that will be highlighted
75-
* `event` - a jquery event that is set for the element defined in the selector. When it fires, the next step is triggered.
7670
* `key_code` - key code for any "key*" event. Event fires only if key code of the pressed key is equal to this property.
7771
* `event_selector` - if you need to attach an event (that was set in "event" property) to other selector, you can use this one
78-
* `description` - description for the highlighted element
7972
* `timeout` - delay before the moment, when an element is highlighted
8073
* `shape` - shape for highlighting (circle|rect)
8174
* `margin` - margin for the highlight shape (for Ex.:10)
8275
* `top` - top margin for the shape of "rect" type
8376
* `right` - right margin for the shape of "rect" type
8477
* `bottom` - bottom margin for the shape of "rect" type
8578
* `left` - left margin for the shape of "rect" type
86-
* `event_type` - type of event that will get you to the next step(auto|custom|next)
8779

8880
#### Event Types descriptions:
8981
**auto** - for example, you need to click on the same button on the second step imediatelly after the first step and go to the next step after it. Then you can use "auto" in the "event_type" property and "click" in "event" property.
@@ -98,9 +90,9 @@ $.get('/load/some_data', function(data){
9890
* `next` - when you set value of event_type to "next", you will see the "Next" btn on this step.
9991

10092
#### Methods
101-
* `setScript` - set current steps configuration. Arguments: config
102-
* `runScript` - run the current script. Has no arguments
103-
* `resumeScript` - resume the script from the step where it was stopped. Has no arguments
93+
* `set` - set current steps configuration. Arguments: config
94+
* `run` - run the current script. Has no arguments
95+
* `resume` - resume the script from the step where it was stopped. Has no arguments
10496
* `getCurrentStep` - returns the current step index
10597

10698
#### Events

0 commit comments

Comments
 (0)