26.09.2019, 17:55
(06.06.2018, 14:37)batistacaceres Wrote:(06.06.2018, 06:32)admin Wrote: This might happen if object element is rendered after hide is called.
One possible solution is to add class to body element instead. Then the browser will handle the rest
Custom CSS:
Code:body.hidebyknx .hidebyknx {
display: none !important;
}
Custom JavaScript:
Code:$(function(){
grp.listen("1/1/1", function(object) {
$(document.body).toggleClass("hidebyknx", object.value == false);
});
});
Thank you very much, now its working very well ...
BR
Hello Admin,
I want to do this function but the trigger object is a 250byte string and I need multiple classes. (BTW is it possible to add more than one class on the same element? If yes what is the correct syntax?).
So if the value of this object is :
1 then make visible class 'set1' and hide class 'set2,set3,...'
2 then make visible class 'set2' and hide the rest
3 ...
4 ...
Thank you