Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

goToStep raise error not a function #2032

Open
jkronegg opened this issue Jan 5, 2024 · 2 comments
Open

goToStep raise error not a function #2032

jkronegg opened this issue Jan 5, 2024 · 2 comments

Comments

@jkronegg
Copy link

jkronegg commented Jan 5, 2024

Description

I have several tags with data-intro properties and I want to start the intro in the middle. There is a minimalistic example which reproduce this behavior:

<span data-intro="span1">I'm a SPAN</span>
<span data-intro="span2">I'm a SPAN</span>
<button onclick="introJs().goToStep(2).start()">Run</button>

The Javascript code is written as described in https://introjs.com/docs/intro/api

Expected Behavior

I expects the Intro Step displaying span2.

Actual Behavior

The following error message appear in the javascript console:

"TypeError: introJs().goToStep(...).start is not a function"

Example

This behavior can be tested in https://jsfiddle.net/jkronegg/92pamcoe/2/ (click the Run button).

Note that the same error occurs when calling functions goToStepNumber or nextStep (as specified in https://introjs.com/docs/intro/api ).

However, when writing:

introJs().start().then(x => x.goToStep(2))

then the Intro Step span2 is displayed as expected.

Environment (optional)

Firefox 120.0
IntroJS 7.2.0

Copy link

stale bot commented Mar 13, 2024

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix label Mar 13, 2024
@Cris123m
Copy link

Cris123m commented Apr 2, 2024

I have the same problem using the CDN.

@stale stale bot removed the wontfix label Apr 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants