@@ -9,7 +9,9 @@ You can obtain your local copy of Intro.js from:
9
9
10
10
** 2)** Using bower ``` bower install intro.js --save ```
11
11
12
- ** 3)** Download it from CDN ([ 1] ( http://www.jsdelivr.com/#!intro.js ) , [ 2] ( http://cdnjs.com/#introjs ) )
12
+ ** 3)** Using npm ``` npm install intro.js --save ```
13
+
14
+ ** 4)** Download it from CDN ([ 1] ( http://www.jsdelivr.com/#!intro.js ) , [ 2] ( http://cdnjs.com/#introjs ) )
13
15
14
16
15
17
## How to use
@@ -19,26 +21,40 @@ Intro.js can be added to your site in three simple steps:
19
21
20
22
> CDN hosted files are available at [ jsDelivr] ( http://www.jsdelivr.com/#!intro.js ) (click Show More) & [ cdnjs] ( http://cdnjs.com/#introjs ) .
21
23
22
- ** 2)** Add ` data-intro ` and ` data-step ` to your HTML elements.
24
+ ** 2)** Add ` data-intro ` and ` data-step ` to your HTML elements.
23
25
24
- For example:
26
+ For example:
25
27
26
28
``` html
27
29
<a href =' http://google.com/' data-intro =' Hello step one!' ></a >
28
30
````
29
31
30
32
See all attributes [here](https://github.com/usablica/intro.js/#attributes).
31
-
33
+
32
34
**3)** Call this JavaScript function:
33
35
```javascript
34
36
introJs().start();
35
37
````
36
-
38
+
37
39
Optionally, pass one parameter to `introJs` function to limit the presentation section.
38
40
39
41
**For example** `introJs(".introduction-farm").start();` runs the introduction only for elements with `class='introduction-farm'`.
40
42
41
- <p align =" center" ><img src =" http://usablica.github.com/intro.js/img/introjs-demo.png" ></p >
43
+ <p align =" center" ><img src =" http://usablica.github.com/intro.js/img/introjs-demo.png" ></p >
44
+
45
+ ## Using templates
46
+
47
+ IntroJS provides awesome templates and we are trying to update and add more templates for next versions. You can browse all templates here: https://github.com/usablica/intro.js/wiki/IntroJs-templates
48
+
49
+ In order to use templates, all you need to do is appending the template stylesheet to your page, *after* IntroJS CSS file:
50
+
51
+ ```html
52
+ <!-- Add IntroJs styles -->
53
+ <link href =" ../../introjs.css" rel =" stylesheet" >
54
+
55
+ <!-- Add Nazanin template -->
56
+ <link href =" ../../themes/introjs-nazanin.css" rel =" stylesheet" >
57
+ ```
42
58
43
59
## API
44
60
@@ -228,7 +244,7 @@ introJs().oncomplete(function() {
228
244
229
245
###introJs.onexit(providedCallback)
230
246
231
- Set callback to exit of introduction. Exit also means pressing `ESC` key and clicking on the overlay layer by the user.
247
+ Set callback to exit of introduction. Exit also means pressing ` ESC ` key and clicking on the overlay layer by the user.
232
248
233
249
**Available since:** v0.2.0
234
250
@@ -262,7 +278,7 @@ The callback function receives the element of the new step as an argument.
262
278
263
279
**Example:**
264
280
```javascript
265
- introJs().onchange(function(targetElement) {
281
+ introJs ().onchange(function(targetElement) {
266
282
alert (" new step" );
267
283
});
268
284
````
@@ -283,7 +299,7 @@ Given callback function will be called before starting a new step of introductio
283
299
284
300
**Example:**
285
301
```javascript
286
- introJs().onbeforechange(function(targetElement) {
302
+ introJs ().onbeforechange(function(targetElement) {
287
303
alert (" before new step" );
288
304
});
289
305
````
@@ -304,7 +320,7 @@ Given callback function will be called after starting a new step of introduction
304
320
305
321
**Example:**
306
322
```javascript
307
- introJs().onafterchange(function(targetElement) {
323
+ introJs ().onafterchange(function(targetElement) {
308
324
alert (" after new step" );
309
325
});
310
326
````
@@ -314,7 +330,7 @@ introJs().onafterchange(function(targetElement) {
314
330
- ` data-intro` : The tooltip text of step
315
331
- ` data-step` : Optionally define the number (priority) of step
316
332
- ` data-tooltipClass` : Optionally define a CSS class for tooltip
317
- - `data-position`: Optionally define the position of tooltip, `top`, `left`, `right` or `bottom` . Default is `bottom`
333
+ - ` data-position` : Optionally define the position of tooltip, ` top` , ` left` , ` right` , ` bottom ` , ` bottom-left-aligned ` (same as ' bottom ' ), ' bottom-middle-aligned ' and ' bottom-right-aligned ' . Default is ` bottom`
318
334
319
335
###Options:
320
336
@@ -332,6 +348,8 @@ introJs().onafterchange(function(targetElement) {
332
348
- ` showButtons` : Show introduction navigation buttons or not, ` true` or ` false`
333
349
- ` showBullets` : Show introduction bullets or not, ` true` or ` false`
334
350
- ` scrollToElement` : Auto scroll to highlighted element if it' s outside of viewport, `true` or `false`
351
+ - `overlayOpacity`: Adjust the overlay opacity, `Number`
352
+ - `disableInteraction`: Disable an interaction inside element or not, `true` or `false`
335
353
336
354
See [setOption](https://github.com/usablica/intro.js/#introjssetoptionoption-value) to see an example.
337
355
@@ -364,23 +382,36 @@ Now you can run this command to minify all static resources:
364
382
365
383
## Instant IntroJs
366
384
367
- Want to learn faster and easier? Here we have **Instant IntroJs**, Packt Publishing.
385
+ Want to learn faster and easier? Here we have **Instant IntroJs**, Packt Publishing.
368
386
369
387
<p align="center">
370
388
<a target=' _blank' href="http://www.packtpub.com/create-useful-introductions-for-websites-and-applications-with-introjs-library/book"><img src=' http: // dgdsbygo8mp3h.cloudfront.net/sites/default/files/imagecache/productview_larger/2517OS_Instant%20IntroJS%20Starter.jpg' /></a>
371
- </p >
389
+ < / p>
372
390
373
391
< p align= " center" >
374
392
< a target= ' _blank' href= " http://www.packtpub.com/create-useful-introductions-for-websites-and-applications-with-introjs-library/book" > Buy and Download< / a>
375
393
< / p>
376
394
377
395
## Roadmap
378
- - Add introduction without focusing on elements
379
396
- Fix problems with ` position: fixed` and other positions
380
397
- Provide more examples
398
+ - Add more templates
381
399
382
400
## Release History
383
401
402
+ * ** v0.9 .0 ** - 2014 - 05 - 23
403
+ - Add IntroJS templates
404
+ - Add more tooltip positions (bottom- right, bottom- middle, bottom- left)
405
+ - Fix table ` tr` element' s issue
406
+
407
+ * **v0.8.0** - 2014-03-25
408
+ - Ability to define introductions without focusing on elements
409
+ - Fix Internet Explorer 8.0 issue
410
+ - Add `_direction` property
411
+
412
+ * **v0.7.1** - 2014-03-11
413
+ - Fix "Too much recursion" issue with Firefox and Internet Explorer.
414
+
384
415
* **v0.7.0** - 2014-02-07
385
416
- Add `onafterchange` event
386
417
- Add scrolling to element option
@@ -451,17 +482,17 @@ Want to learn faster and easier? Here we have **Instant IntroJs**, Packt Publish
451
482
- Fix show element for elements with position `absolute` or `relative`
452
483
- Add `enter` key for navigating in steps
453
484
- Code refactoring
454
-
455
-
456
- * **v0.1.0** - 2013-03-16
457
- - First commit.
485
+
486
+
487
+ * **v0.1.0** - 2013-03-16
488
+ - First commit.
458
489
459
490
## Author
460
491
**Afshin Mehrabani**
461
492
462
493
- [Twitter](https://twitter.com/afshinmeh)
463
494
- [Github](https://github.com/afshinm)
464
- - [Personal page](http://afshinm.name/)
495
+ - [Personal page](http://afshinm.name/)
465
496
466
497
[Other contributors](https://github.com/usablica/intro.js/graphs/contributors)
467
498
@@ -473,15 +504,15 @@ Want to learn faster and easier? Here we have **Instant IntroJs**, Packt Publish
473
504
## License
474
505
> Copyright (C) 2012 Afshin Mehrabani ([email protected] )
475
506
476
- Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
477
- documentation files (the "Software"), to deal in the Software without restriction, including without limitation
478
- the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software,
507
+ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
508
+ documentation files (the "Software"), to deal in the Software without restriction, including without limitation
509
+ the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software,
479
510
and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
480
- The above copyright notice and this permission notice shall be included in all copies or substantial portions
511
+ The above copyright notice and this permission notice shall be included in all copies or substantial portions
481
512
of the Software.
482
513
483
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED
484
- TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
485
- THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
486
- CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
514
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED
515
+ TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
516
+ THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
517
+ CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
487
518
IN THE SOFTWARE.
0 commit comments