This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm that you accept these cookies being set.

flashing alert
#5
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:
$(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;
      }
    });
  };
});
Reply


Messages In This Thread
flashing alert - by Nir70 - 28.09.2021, 05:37
RE: flashing alert - by admin - 28.09.2021, 05:45
RE: flashing alert - by Nir70 - 28.09.2021, 15:55
RE: flashing alert - by Dré - 28.09.2021, 17:13
RE: flashing alert - by Nir70 - 06.10.2021, 05:40
RE: flashing alert - by Nir70 - 06.10.2021, 11:16
RE: flashing alert - by admin - 29.09.2021, 06:12
RE: flashing alert - by khalil - 29.09.2021, 07:34
RE: flashing alert - by Nir70 - 29.09.2021, 19:53
RE: flashing alert - by khalil - 30.09.2021, 07:00
RE: flashing alert - by Nir70 - 30.09.2021, 08:52
RE: flashing alert - by khalil - 30.09.2021, 09:00
RE: flashing alert - by Nir70 - 30.09.2021, 10:42
RE: flashing alert - by admin - 29.09.2021, 08:16
RE: flashing alert - by khalil - 29.09.2021, 10:22
RE: flashing alert - by Nir70 - 29.09.2021, 10:33
RE: flashing alert - by admin - 29.09.2021, 10:36
RE: flashing alert - by khalil - 29.09.2021, 11:11
RE: flashing alert - by Daniel - 30.09.2021, 10:55
RE: flashing alert - by Daniel - 06.10.2021, 07:33

Forum Jump: