Skip to content

Commit 59a78b3

Browse files
committed
Merge pull request usablica#214 from Nyholm/feature-noSteps
Added support for omitting data-step
2 parents 042012c + 998eb60 commit 59a78b3

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

intro.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,10 +92,12 @@
9292

9393
for (var i = 0, elmsLength = allIntroSteps.length; i < elmsLength; i++) {
9494
var currentElement = allIntroSteps[i];
95+
var step = parseInt(currentElement.getAttribute('data-step'), 10);
9596
introItems.push({
9697
element: currentElement,
9798
intro: currentElement.getAttribute('data-intro'),
98-
step: parseInt(currentElement.getAttribute('data-step'), 10),
99+
//if step==NaN set step to 100
100+
step: step ? step : 100,
99101
tooltipClass: currentElement.getAttribute('data-tooltipClass'),
100102
position: currentElement.getAttribute('data-position') || this._options.tooltipPosition
101103
});

0 commit comments

Comments
 (0)