01.01.2021, 21:07
(16.11.2020, 07:40)admin Wrote: Add to Custom CSS:Nice, thanks Admin
Code:.spin-animation {
animation: spin 2s infinite linear;
}
@keyframes spin {
from {
transform:rotate(0deg);
}
to {
transform:rotate(360deg);
}
}
Add to Custom JS, change additional class from rotate to spin:
Code:$(function(){
$('.spin').each(function(i, el) {
var $el = $(el), addr = $el.data('object'); // or 'status-object'
grp.listen(addr, function(obj) {
$el.find('.icon').toggleClass('spin-animation', obj.value > 0);
});
});
});