Skip to content
This repository has been archived by the owner on Jan 12, 2021. It is now read-only.

Unable to listen to any of the events #33

Closed
devWaleed opened this issue Nov 6, 2018 · 1 comment
Closed

Unable to listen to any of the events #33

devWaleed opened this issue Nov 6, 2018 · 1 comment

Comments

@devWaleed
Copy link

devWaleed commented Nov 6, 2018

My intro of app is working correctly but I am unable to listen to events.

In mounted of main App.js I have this code:


mounted: {

	this.$intro().onbeforechange(function (targetElement) {
	    console.log("before new step"); // no output
	    console.log(targetElement); // no output
	});

	this.$intro().onchange(function (targetElement) {
	    console.log("new step"); // no output
	});

	console.log('Post intro start', this.$intro()); // this prints some instance variables
}
@devWaleed
Copy link
Author

devWaleed commented Nov 6, 2018

introJS is chaining events and start() needs to be called here apparently. So correct way to do this is::

this.$intro()
.onbeforechange(function (targetElement) {
    console.log("before new step"); // no output
    console.log(targetElement); // gets element
})
.start();

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant