1
- # Intro.js
1
+ # Intro.js v2.0
2
2
3
3
> Better introductions for websites and features with a step-by-step guide for your projects.
4
4
@@ -21,7 +21,7 @@ Intro.js can be added to your site in three simple steps:
21
21
22
22
> CDN hosted files are available at [ jsDelivr] ( http://www.jsdelivr.com/#!intro.js ) (click Show More) & [ cdnjs] ( http://cdnjs.com/#introjs ) .
23
23
24
- ** 2)** Add ` data-intro ` and ` data-step ` to your HTML elements.
24
+ ** 2)** Add ` data-intro ` and ` data-step ` to your HTML elements. To add hints you should use ` data-hint ` attribute.
25
25
26
26
For example:
27
27
@@ -220,6 +220,84 @@ introJs().refresh();
220
220
221
221
----
222
222
223
+ ###introJs .addHints ()
224
+
225
+ To add available hints to the page (using ` data-hint` or JSON )
226
+
227
+ ** Available since** : v2.0
228
+
229
+ ** Returns: **
230
+ - introJs object.
231
+
232
+ ** Example: **
233
+ ` ` ` javascript
234
+ introJs().addHints();
235
+ ` ` ` `
236
+
237
+ -----
238
+
239
+ ###introJs.onhintclick(providedCallback)
240
+
241
+ Invkoes given function when user clicks on one of hints.
242
+
243
+ **Available since**: v2.0
244
+
245
+ **Parameters:**
246
+ - providedCallback : Function
247
+
248
+ **Returns:**
249
+ - introJs object.
250
+
251
+ **Example:**
252
+ ` ` ` javascript
253
+ introJs ().onhintclick (function () {
254
+ alert (" hint clicked" );
255
+ });
256
+ ````
257
+
258
+ ---- -
259
+
260
+ ###introJs .onhintsadded (providedCallback)
261
+
262
+ Invokes given callback function after adding and rendering all hints.
263
+
264
+ **Available since**: v2.0
265
+
266
+ **Parameters:**
267
+ - providedCallback : Function
268
+
269
+ **Returns:**
270
+ - introJs object.
271
+
272
+ **Example:**
273
+ ```javascript
274
+ introJs ().onhintsadded(function() {
275
+ alert (" all hints were added" );
276
+ });
277
+ ````
278
+
279
+ ---- -
280
+
281
+ ###introJs .onhintclose (providedCallback)
282
+
283
+ Set callback for when a single hint removes from page (e .g . when user clicks on " Got it" button)
284
+
285
+ ** Available since** : v2.0
286
+
287
+ ** Parameters: **
288
+ - providedCallback : Function
289
+
290
+ ** Returns: **
291
+ - introJs object.
292
+
293
+ ** Example: **
294
+ ` ` ` javascript
295
+ introJs().onhintclose(function() {
296
+ alert("hint closed");
297
+ });
298
+ ` ` ` `
299
+
300
+ -----
223
301
224
302
###introJs.oncomplete(providedCallback)
225
303
0 commit comments