Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 6983efc

Browse files
author
bozdoz
committed
Merge branch 'master' of https://github.com/cdownie/intro.js into cdownie-master
Conflicts: intro.js
2 parents 0a08657 + 33b6f31 commit 6983efc

File tree

1 file changed

+15
-13
lines changed

1 file changed

+15
-13
lines changed

intro.js

+15-13
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,9 @@
9999
/* Hint button label */
100100
hintButtonLabel: 'Got it',
101101
/* Adding animation to hints? */
102-
hintAnimation: true
102+
hintAnimation: true,
103+
/* additional classes to put on the buttons */
104+
buttonClass: "introjs-button"
103105
};
104106
}
105107

@@ -1245,7 +1247,7 @@
12451247

12461248
//skip button
12471249
skipTooltipButton = document.createElement('a');
1248-
skipTooltipButton.className = 'introjs-button introjs-skipbutton';
1250+
skipTooltipButton.className = this._options.buttonClass + ' introjs-skipbutton ';
12491251
_setAnchorAsButton(skipTooltipButton);
12501252
skipTooltipButton.innerHTML = this._options.skipLabel;
12511253

@@ -1290,22 +1292,22 @@
12901292
// when it's the first step of tour
12911293
if (this._currentStep === 0 && this._introItems.length > 1) {
12921294
if (typeof skipTooltipButton !== "undefined" && skipTooltipButton !== null) {
1293-
skipTooltipButton.className = 'introjs-button introjs-skipbutton';
1295+
skipTooltipButton.className = this._options.buttonClass + ' introjs-skipbutton';
12941296
}
12951297
if (typeof nextTooltipButton !== "undefined" && nextTooltipButton !== null) {
1296-
nextTooltipButton.className = 'introjs-button introjs-nextbutton';
1298+
nextTooltipButton.className = this._options.buttonClass + ' introjs-nextbutton';
12971299
}
12981300

12991301
if (this._options.hidePrev === true) {
13001302
if (typeof prevTooltipButton !== "undefined" && prevTooltipButton !== null) {
1301-
prevTooltipButton.className = 'introjs-button introjs-prevbutton introjs-hidden';
1303+
prevTooltipButton.className = this._options.buttonClass + ' introjs-prevbutton introjs-hidden';
13021304
}
13031305
if (typeof nextTooltipButton !== "undefined" && nextTooltipButton !== null) {
13041306
_addClass(nextTooltipButton, 'introjs-fullbutton');
13051307
}
13061308
} else {
13071309
if (typeof prevTooltipButton !== "undefined" && prevTooltipButton !== null) {
1308-
prevTooltipButton.className = 'introjs-button introjs-prevbutton introjs-disabled';
1310+
prevTooltipButton.className = this._options.buttonClass + ' introjs-prevbutton introjs-disabled';
13091311
}
13101312
}
13111313

@@ -1320,31 +1322,31 @@
13201322
_addClass(skipTooltipButton, 'introjs-donebutton');
13211323
}
13221324
if (typeof prevTooltipButton !== "undefined" && prevTooltipButton !== null) {
1323-
prevTooltipButton.className = 'introjs-button introjs-prevbutton';
1325+
prevTooltipButton.className = this._options.buttonClass + ' introjs-prevbutton';
13241326
}
13251327

13261328
if (this._options.hideNext === true) {
13271329
if (typeof nextTooltipButton !== "undefined" && nextTooltipButton !== null) {
1328-
nextTooltipButton.className = 'introjs-button introjs-nextbutton introjs-hidden';
1330+
nextTooltipButton.className = this._options.buttonClass + ' introjs-nextbutton introjs-hidden';
13291331
}
13301332
if (typeof prevTooltipButton !== "undefined" && prevTooltipButton !== null) {
13311333
_addClass(prevTooltipButton, 'introjs-fullbutton');
13321334
}
13331335
} else {
13341336
if (typeof nextTooltipButton !== "undefined" && nextTooltipButton !== null) {
1335-
nextTooltipButton.className = 'introjs-button introjs-nextbutton introjs-disabled';
1337+
nextTooltipButton.className = this._options.buttonClass + ' introjs-nextbutton introjs-disabled';
13361338
}
13371339
}
13381340
} else {
13391341
// steps between start and end
13401342
if (typeof skipTooltipButton !== "undefined" && skipTooltipButton !== null) {
1341-
skipTooltipButton.className = 'introjs-button introjs-skipbutton';
1343+
skipTooltipButton.className = this._options.buttonClass + ' introjs-skipbutton';
13421344
}
13431345
if (typeof prevTooltipButton !== "undefined" && prevTooltipButton !== null) {
1344-
prevTooltipButton.className = 'introjs-button introjs-prevbutton';
1346+
prevTooltipButton.className = this._options.buttonClass + ' introjs-prevbutton';
13451347
}
13461348
if (typeof nextTooltipButton !== "undefined" && nextTooltipButton !== null) {
1347-
nextTooltipButton.className = 'introjs-button introjs-nextbutton';
1349+
nextTooltipButton.className = this._options.buttonClass + ' introjs-nextbutton';
13481350
}
13491351
if (typeof skipTooltipButton !== "undefined" && skipTooltipButton !== null) {
13501352
skipTooltipButton.innerHTML = this._options.skipLabel;
@@ -2177,7 +2179,7 @@
21772179
tooltipWrapper.innerHTML = item.hint;
21782180

21792181
var closeButton = document.createElement('a');
2180-
closeButton.className = 'introjs-button';
2182+
closeButton.className = this._options.buttonClass;
21812183
closeButton.setAttribute('role', 'button');
21822184
closeButton.innerHTML = this._options.hintButtonLabel;
21832185
closeButton.onclick = _hideHint.bind(this, stepId);

0 commit comments

Comments
 (0)