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

Initialized is called twice if the plugin is called twice #112

Open
Mottie opened this issue Mar 26, 2013 · 0 comments
Open

Initialized is called twice if the plugin is called twice #112

Mottie opened this issue Mar 26, 2013 · 0 comments
Labels

Comments

@Mottie
Copy link
Contributor

Mottie commented Mar 26, 2013

The following code (demo):

$('#slider').movingBoxes({
   initialized: function (e, slider, tar) {
        console.log('initialized');
    },
    // callback upon change panel initialization
    initChange: function (e, slider, tar) {
        console.log('init changed');
    },
    // callback before any animation occurs
    beforeAnimation: function (e, slider, tar) {
       console.log('before animation');
    },
    // callback after animation completes
    completed: function (e, slider, tar) {
        console.log('completed');
    }
});
$('#slider').movingBoxes();

will result in this in the console

completed
initialized
initialized

Fix the plugin so the completed event isn't called in this situation, and initialized is only called once.

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

No branches or pull requests

1 participant