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 Button visible/invisible
#7
uHi,

Exactly the same, just remove the command that change the visibility:
Code:
$(function(){
  grp.listen('1/1/1', function(object) {
     if (object.value == true ) {
        $(".lockbyknx").addClass("item-read-only");
     } else if (object.value == false ) {
        $(".lockbyknx").removeClass("item-read-only");
     }
  }, true); // set to true to send on same value
});
Personally i think you should leave it unchanged as the original does visual indicates it's disabled.. (maybe you should change only the amount of opacity from 0.5 to 0.8 )

BR,

Erwin
Reply


Messages In This Thread
Make Button visible/invisible - by forsterm - 27.03.2017, 16:29
RE: Make Button visible/invisible - by cekca - 28.03.2017, 16:49
RE: Make Button visible/invisible - by Erwin van der Zwart - 07.10.2017, 11:28
RE: Make Button visible/invisible - by JMM - 06.06.2018, 06:17
RE: Make Button visible/invisible - by admin - 06.06.2018, 06:32
RE: Make Button visible/invisible - by admin - 09.04.2019, 07:46
RE: Make Button visible/invisible - by Fahd - 07.02.2023, 07:56
RE: Make Button visible/invisible - by admin - 07.02.2023, 09:13

Forum Jump: