29.08.2024, 15:49
It's not working because the previous function in Custom JavaScript fails with an error. Change it to this and it will work:
Code:
$(function(){
$('.slider-alt').each(function(_, el) {
var $el = $(el), addr = $el.data('object'), icon = $el.find('.icon');
if (addr) {
grp.listen(addr, function(obj) {
var val = obj.value || false;
//val = Math.round(2.55 * (100 - val));
var name = el.getAttribute('data-object-name');
el.textContent = name
});
}
});
});