File tree Expand file tree Collapse file tree 3 files changed +10
-6
lines changed Expand file tree Collapse file tree 3 files changed +10
-6
lines changed Original file line number Diff line number Diff line change @@ -24,6 +24,7 @@ <h3 class="muted">Examples</h3>
24
24
< li > < a href ="hello-world/index.html " title ='Basic Usage '> Basic Usage</ a > </ li >
25
25
< li > < a href ="programmatic/index.html " title ='Programmatic defining using JSON '> Programmatic defining using JSON</ a > </ li >
26
26
< li > < a href ="multi-page/index.html " title ='Multi-Page introduction '> Multi-Page introduction</ a > </ li >
27
+ < li > < a href ="RTL/index.html " title ='Multi-Page introduction '> RTL version</ a > </ li >
27
28
</ ul >
28
29
</ div >
29
30
</ body >
Original file line number Diff line number Diff line change @@ -75,11 +75,11 @@ <h4>Section Six</h4>
75
75
intro . setOptions ( {
76
76
steps : [
77
77
{
78
- element : '#step1' ,
78
+ element : document . querySelector ( '#step1' ) ,
79
79
intro : "This is a tooltip."
80
80
} ,
81
81
{
82
- element : '#step2' ,
82
+ element : document . querySelectorAll ( '#step2' ) [ 0 ] ,
83
83
intro : "Ok, wasn't that fun?" ,
84
84
position : 'right'
85
85
} ,
Original file line number Diff line number Diff line change 1
1
/**
2
- * Intro.js v0.4 .0
2
+ * Intro.js v0.5 .0
3
3
* https://github.com/usablica/intro.js
4
4
* MIT licensed
5
5
*
19
19
}
20
20
} ( this , function ( exports ) {
21
21
//Default config/variables
22
- var VERSION = '0.4 .0' ;
22
+ var VERSION = '0.5 .0' ;
23
23
24
24
/**
25
25
* IntroJs main class
61
61
var currentItem = this . _options . steps [ i ] ;
62
62
//set the step
63
63
currentItem . step = i + 1 ;
64
- //grab the element with given selector from the page
65
- currentItem . element = document . querySelector ( currentItem . element ) ;
64
+ //use querySelector function only when developer used CSS selector
65
+ if ( typeof ( currentItem . element ) === 'string' ) {
66
+ //grab the element with given selector from the page
67
+ currentItem . element = document . querySelector ( currentItem . element ) ;
68
+ }
66
69
introItems . push ( currentItem ) ;
67
70
}
68
71
You can’t perform that action at this time.
0 commit comments