29.09.2021, 19:53
(29.09.2021, 06:12)admin Wrote: Animated GIF is an easy solution.
This can also be achieved with Custom JavaScript. This example will show/hide all elements with additional class set to alert every second when 0/1/24 value is set to true. You can also change $('.alert').removeClass('hide'); to $('.alert').addClass('hide'); to hide the element when the object value is false.
Code:1234567891011121314151617181920$(function(){ if (window.grp) { var timer; grp.listen('0/1/24', function(object) { if (object.value) { if (!timer) { timer = setInterval(function() { $('.alert').toggleClass('hide'); }, 1000); } } else { $('.alert').removeClass('hide'); clearInterval(timer); timer = null; } }); }; });
Hello
I entered the script but I have a lot of error messages you can check it again thanks
? p.s my object 1/7/20 thanks