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.

Make the text blink when the value is 1
#9
Hi.

Im trying to use this code:


Code:
$(function() {
  $('.java_test').each(function(_, el) {
    var addr = $(el).data('object');
    if (addr) {
      grp.listen(addr, function(obj) {
        var color_1;

        if (obj.value) {
          color_1 = 'red';
        }
        else  {
          color_1 = 'Green';
        }

        $(el).css('color_1',obj.value).toggleClass('class_for_1', obj.value);
      });
    }
  });
});
to toggle a css class. For value 1 i would like to set css class f.e. class_for_1 with parameter filter: drop-shadow (x1, y1, b1, c1), if value is 0 class should be changed to class_for_0 with parameter filter: drop-shadow (x2, y2, b2, c2). It's working only for value=1. Please help.

Thanks
Reply


Messages In This Thread
RE: Make the text blink when the value is 1 - by Re-G - 12.02.2023, 18:04

Forum Jump: