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.

Auto opening widget, Changing camera view in 1 small widget
#10
Hi Buuuudzik,

There is nothing changed, but with custom JavaScript it's possible.

Here is a sample on how to do that:

You have to check the widget id of your widget, in this sample it's id: 'widget-1' 

Code:
$(function(){
 
 // Open widget on load
 $("#widget-1").removeClass("hide");
 
 // Optional: Position widget (absolute position)
 //document.getElementById("widget-1").style.top = "100px";
 //document.getElementById("widget-1").style.left = "100px";
 
 // Open widget on KNX command
 grp.listen('1/1/1', function(object, state) {
    if (state == 'value' && object.value == true ) {
        // Command to show widget
        $("#widget-1").removeClass("hide");
   }
 }, true); // set to true to execute on same object value
 
 // Close widget on KNX command
 grp.listen('1/1/1', function(object, state) {
    if (state == 'value' && object.value == false ) {
        // Command to hide widget
        $("#widget-1").addClass("hide");
   }
 }, true); // set to true to execute on same object value
 
});

BR,

Erwin van der Zwart
Reply


Messages In This Thread
RE: Auto opening widget, Changing camera view in 1 small widget - by Erwin van der Zwart - 11.09.2016, 21:27

Forum Jump: