03.10.2023, 13:36
Code:
$(function(){
$('.rotate').each(function(i, el) {
var $el = $(el), addr = $el.data('object'); // or 'status-object'
grp.listen(addr, function(obj) {
$el.each(function () {
this.style.setProperty('transform', 'rotate(' + obj.value + 'deg)', 'important');
});
});
});
});
Updated version that includes the 'important' css tag. Otherwise it isn't working when the object is set to 'read only'.
Special thanks to Erwin van der Zwart