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

Listener events #6

Closed
karneaud opened this issue Apr 11, 2015 · 2 comments
Closed

Listener events #6

karneaud opened this issue Apr 11, 2015 · 2 comments

Comments

@karneaud
Copy link

Are there any events i can listen to?

@MrSaints
Copy link
Owner

@karneaud There is an event callback option which you can pass your own function to. For example (taken from #3 -- see it for more info):

$("#js-rotating").Morphext({
    complete: function () {
        // 1. Stop if phrase index is 3
        if (this.index === 3) {
            this.stop();
        }

        // 2. Stop if phrase is "Stop here" by retrieving the current phrase through its index
        if (this.phrases[this.index] === "Stop here") {
            this.stop();
        }

        // 3. Stop at the last phrase
        if (this.index === this.phrases.length - 1) {
            this.stop();
        }
    }
});

There's no specific pub/sub kind of event though. Let me know if this helps you and if not, let me know the specific event you would like and I may consider adding it in (or at least creating a modified version for you).

Thanks!

@MrSaints
Copy link
Owner

I'm closing this issue as it is becoming stale.

Please do let me know if you have any questions or other problems. I'm more than happy to help.

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