Skip to content

Commit

Permalink
Use currentStep() instead of _currentStep in docs
Browse files Browse the repository at this point in the history
  • Loading branch information
vkrol committed Oct 20, 2020
1 parent 32f6c22 commit f5814fa
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 @@ -372,7 +372,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 f5814fa

Please sign in to comment.