Topic: Trigger animations on command
ajching
free
asked 5 years ago
Is there a way to get the MDB animations to play when you want them to, such as through using .click()? They definitely work when I initially add the animation classes to things, but after that removing and re-adding them has no effect. Adding the class is the only way I'm aware of how to trigger the animations, so I'm wondering how this works exactly.
Add comment
ajching
free
answered 5 years ago
After a few adjustments to work with my code, it works well! Thanks for the quick reply.
Mirosław Stasiak
free
answered 5 years ago
Hi,
Try this script
$('#button').on('click', function() {
$('#animationObject').removeClass().addClass('bounce animated').one('webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend', function() {
$(this).removeClass();
});
})
Let me know if everything works correctly.
Regards
FREE CONSULTATION
Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.
Status
Specification of the issue
- User: Free
- Premium support: No
- Technology: General Bootstrap questions
- MDB Version: -
- Device: -
- Browser: -
- OS: -
- Provided sample code: No
- Provided link: No
Tags