14.01.2019, 10:39
You can do it other way round with Custom JavaScript. You can assign a custom class to your object, then get attached group address via data attribute.
Here's an example that will rotate all elements with rotate class according to attached object value:
Here's an example that will rotate all elements with rotate class according to attached object value:
Code:
$(function(){
$('.rotate').each(function(i, el) {
var $el = $(el), addr = $el.data('object'); // or 'status-object'
grp.listen(addr, function(obj) {
$el.css('transform', 'rotate(' + obj.value + 'deg');
});
});
});