Topic: Animation - unable to start manually more times, class animation not removed when finished
meesha81 priority asked 6 months ago
Expected behavior I hope that option animationReset: true should "reset" animation when finish = remove "animation" class. You have no detail information about this option - what does it mean reset. So I expect that this should remove animation when finished to be able start animation again without solving "stopAnimation()" manually. So this option is not work properly, because animation is not resetted. Am I right?
Actual behavior startAnimation() do not remove animation class etc and animation is still present in the background (class animation was not removed) and you are not able to run it again without stopAnimation().
Resources (screenshots, code snippets etc.) I have prepared the snippet:
https://mdbootstrap.com/snippets/standard/meesha81/6141229
meesha81 priority answered 6 months ago
Thank you for information. I can confirm that with init() function after getOrCreateInstance() works fine. It looks like blank space in documentation, because there is no method init() and no information for javascript initialization. That's why I didn't use init() function, your documentation have no information about it, so you can fix documentation.
Grzegorz Bujański staff answered 6 months ago
The reset
option removes the animation
css class, but this component requires running the init
method to initialize. So if you add animationInstance.init();
in your code everything should start working.
FREE CONSULTATION
Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.
Answered
- ForumUser: Priority
- Premium support: Yes
- Technology: MDB Standard
- MDB Version: MDB5 7.3.1
- Device: PC
- Browser: Chrome
- OS: Win11
- Provided sample code: No
- Provided link: Yes