You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+53-23Lines changed: 53 additions & 23 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,7 +4,9 @@ EnjoyHint
4
4
5
5
EnjoyHint is free software distributed under the terms of MIT license.
6
6
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))
@@ -58,34 +58,44 @@ Highlight some button and after you click on it, highlight some panel:
58
58
```javascript
59
59
var enjoyhint_script_steps = [
60
60
{
61
-
selector:'.some_btn',//jquery selector
62
-
event:'click',
63
-
description:'Click on this btn'
61
+
'click .some_btn':'Click on this btn'
64
62
},
65
63
{
66
-
selector:'.some_panel',//jquery selector
67
-
event:'click',
68
-
description:'Click on this panel'
64
+
'click .some_panel':'Click on this panel'
69
65
}
70
66
];
71
67
```
72
68
73
69
#### 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.
76
-
*`key_code` - key code for any "key*" event. Event fires only if key code of the pressed key is equal to this property.
70
+
*`"event selector" : "description"` - to describe a step you should set an event type, selecte element and add description for this element (hint)
71
+
*`keyCode` - the code of a button, which triggers the next EnjoyHint step upon a click. Defined by the “key” event. (“key #block” : “hello”).
77
72
*`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
79
73
*`timeout` - delay before the moment, when an element is highlighted
80
-
*`shape` - shape for highlighting (circle|rect)
74
+
*`shape` - shape for highlighting (circle|rect)
75
+
*`radius` - if the shape of "circle" is specified, we can set the radius.
81
76
*`margin` - margin for the highlight shape (for Ex.:10)
82
77
*`top` - top margin for the shape of "rect" type
83
78
*`right` - right margin for the shape of "rect" type
84
79
*`bottom` - bottom margin for the shape of "rect" type
85
-
*`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)
80
+
*`left` - left margin for the shape of "rect" type
81
+
*`scrollAnimationSpeed` - sets the auto scroll speed (ms).
82
+
*`nextButton` - allows applying its classes and names for the button Nеxt.
83
+
*`skipButton` - allows applying its classes and names for the button Skip. For the example :
84
+
```javascript
85
+
var options = {
86
+
"next #block":'Hello.',
87
+
"nextButton": {className:"myNext", text:"NEXT"},
88
+
"skipButton": {className:"mySkip", text:"SKIP"},
89
+
90
+
}
91
+
```
92
+
*`showSkip` - shows or hides the Skip button (true|false)
93
+
*`showNext` - shows or hides the Next button (true|false)
94
+
87
95
88
-
#### Event Types descriptions:
96
+
97
+
98
+
#### Non-standard events:
89
99
**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.
90
100
*`custom` - this value is very usefull if you need to go to the next step by event in your app code. For example, you want to go to the next step only after some data have been loaded in your application. Then you should use the "custom" event_type and the "trigger" method of the EnjoyHint instance.
0 commit comments