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

Remove animation not working #11

Open
vjain20 opened this issue Jun 12, 2016 · 1 comment
Open

Remove animation not working #11

vjain20 opened this issue Jun 12, 2016 · 1 comment

Comments

@vjain20
Copy link

vjain20 commented Jun 12, 2016

Thank you for providing this package. I am trying this package out and the insert animation is working but for some reason, I am not able to get the remove animation to work.

Template.item.animations({
    ".item": {
        animateInitial: true, // animate the intial elements
        animateInitialStep: 200, // Step between each animation for each initial item
        animateInitialDelay: 500,
        container: ".item-container", // container of the ".item" elements
        insert: {
            class: "fade-in", // class applied to inserted elements
            before: function (attrs, element, template) {
                console.log('before insert');
            }, // callback before the insert animation is triggered
            after: function (attrs, element, template) {
                console.log('after insert');
            }, // callback after an element gets inserted
            delay: 500 // Delay before inserted items animate
        },
        remove: {
            class: "fade-out", // class applied to removed elements
            before: function (attrs, element, template) {
                console.log('before remove');
            }, // callback before the remove animation is triggered
            after: function (attrs, element, template) {
                console.log('after remove');
            }, // callback after an element gets removed
            delay: 500 // Delay before removed items animate
        }
    }
});
.fade-in{
    opacity: 1 !important;
    transition: all 0.5s ease 1s !important;
}

.fade-out{
    opacity: 0 !important;
    transition: all 1s ease 1s !important;
}

The remove.before() and remove.after() functions are not even getting called (in fact even insert.after() is not getting called but insert animation seems to work). I am working with meteor version 1.3.2.4.
I added the package - natestrauser:animate-css after looking at this issue - #8 but that didn't work either. Please help me fix it.

@cosmin-novac
Copy link

I'm having the same problem. Any solution?

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