Skip to content

Commit

Permalink
Merge pull request #1053 from vkrol/use-current-step-in-docs
Browse files Browse the repository at this point in the history
Use currentStep() instead of _currentStep in docs
  • Loading branch information
afshinm committed Nov 21, 2020
2 parents b2626ba + f5814fa commit 0e80ab7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion docs/docs/intro/api.md
Expand Up @@ -388,7 +388,7 @@ If you want to prevent displaying the next / previous step, return `false` in `p

```javascript
introJs().onbeforechange(function() {
alert("before new step. Step: " + this._currentStep);
alert("before new step. Step: " + this.currentStep());

// return false to stop displaying the next step
// return false;
Expand Down
2 changes: 1 addition & 1 deletion example/callbacks/onbeforechange.html
Expand Up @@ -72,7 +72,7 @@ <h4>Section Six</h4>
function startIntro(){
var intro = introJs();
intro.onbeforechange(function () {
if (this._currentStep === 2) {
if (this.currentStep() === 2) {
alert('You cannot continue! :P')
return false;
}
Expand Down

0 comments on commit 0e80ab7

Please sign in to comment.