- Issue created by @delacosta456
- 🇵🇱Poland mahyarss
Hi @delacosta456,
I'm glad that you are using this module.Actually, this option is available:
Documentation: http://animejs.com/documentation/#playPause
You can play or pause the animation by clicking, first you have to set autoplay: false for example:
var bouncingBall = anime({ targets: '.box', translateY: '50vh', duration: 300, loop: 4, direction: 'alternate', easing: 'easeInCubic', autoplay: false //if you don't want play animation on page load });
Then play your animation by onclick even
document.querySelector('.box').onclick = bouncingBall //onclick event
I hope this is helpful
Please let me know that your request has been resolved. - 🇵🇱Poland mahyarss
Also, there is other example for Anime toggle 'mousedown' and 'mouseup' event:
https://codepen.io/slavanossar/pen/PoweKmP - 🇧🇯Benin delacosta456
hi
many thanks for replying
My request was more about something that could "also" be configurable from UIAn illustration could be what this d7 module offer https://www.drupal.org/project/link_onclick →
Thanks
- 🇵🇱Poland mahyarss
Thanks for the further explanation, I understand better now.
In fact, I made a user interface for some of my modules, to make it easier to use.
Such as modules:
Textimate → (Text + Animate)
Vivus → (SVG Animate)
Animate CSS → (Animate.css animation library)
AOS JS → (Animate On Scroll JavaScript library)
Pattern CSS → (Pattern.css library)
etc.So for this module, if I have a chance, I will definitely do this in future plans and I will create many options for the ease of creating animations for different modes.
Please star the module to check the Anime module page again in the future for know about new updates.
Best regards
- Status changed to Closed: outdated
10 months ago 1:22pm 15 June 2024