03.01.2022, 10:49
(03.01.2022, 06:20)admin Wrote: It's not possible to do this without JavaScript. Animation will work only until the mouse button is released. So only very short animations can be done this way.
JavaScript:
Code:$(function() { $('body').on('click', '.item-control', function() { this.classList.remove('active'); this.offsetHeight; this.classList.add('active'); }); });
CSS:
Code:.item-control.active { animation: clickanim 3s ease-out; } @keyframes clickanim { 0% { opacity: 1; } 10% { opacity: 0; } 100% { opacity: 1; } }
Hello admin!
Thanks for the reply.
It works on my laptop but not working with Smartphone. Tried on my Iphone and with Android.
Any suggestion?
Thanks!