usablica / intro.js

Lightweight, user-friendly onboarding tour library
http://introjs.com
Other
22.8k stars 2.59k forks source link

Issue with introJs().oncomplete(); #956

Closed asprunger closed 3 years ago

asprunger commented 4 years ago

Description

Describe one (and only one) issue or enhancement you want to see in Intro.js (before writing any code). The method oncomplete(); is never throw.

Expected Behavior

What did you expect to happen? I wanted to have a log in my console

Actual Behavior

What actually happened? Nothing

Errors and Screenshots (optional)

Give us any additional information if you have.

Example (recommended)

How can someone else see/test this issue? List the steps or write some code; or create a jsfiddle or codepen. This is what I try to use but it doesn't work. introJs().oncomplete(function () { console.log("Fin introJS"); });

Environment (optional)

List browser information, Intro.js version, Operating System, JavaScript libraries (jQuery, Angular, React), etc.

ScottHuston commented 4 years ago

You can't use the generic constructor to do this without chaining your methods AFAIK. Create an object or chain.

var myIntro = introJs();
myIntro.oncomplete(function() { console.log("Fin introJS");});
myIntro.start();

or

introJs()
   .oncomplete(function() { console.log("Fin introJS");})
   .start();
psiservices-jreskin commented 4 years ago

I have the same problem... thought I was missing something.

stale[bot] commented 3 years ago

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.