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.

javascript to check css element
#1
I have some simple JavaScript to hide/show images based on group address, 
how can i check css element before making next change like the below.
Many Thanks

Code:
$(function(){
  grp.listen('1/1/1', function(object, state) {
     if (state == 'value' && object.value == true) {
     //Check if css element .hidebyknx is shown then continue    
     $(".hidebyknx").addClass("hide");
     } else if (state == 'value' && object.value == false) {
         $(".hidebyknx").removeClass("hide");
     }
  }, true);
});
Reply


Messages In This Thread
javascript to check css element - by benanderson_475 - 05.07.2021, 06:17

Forum Jump: