27.06.2017, 16:56
HI,
The script here is which works well, it is not certainly very academic.... I does not follow a specialist of the js!
JMM.
The script here is which works well, it is not certainly very academic.... I does not follow a specialist of the js!
JMM.
Code:
// Init widget and change display and opacity
$("#widget-27").removeClass('hide');
$("#widget-27").css("display", "none").css("opacity", "0");
// Open widget on KNX command
grp.listen('2/3/4', function(object, state) {
if (state == 'value' && object.value == true ) {
// hide camera on widget In the case she would have remained open and triggered open button camera
$("#widget-27 > div").addClass('hide').trigger('vclick').css("pointer-events", "none");
// Command to show widget
$('#widget-27').css({'display':'block', 'opacity': '1', 'transform': 'perspective(800px)', 'top': '200px', 'left': '500px'});
}
}, true); // set to true to execute on same object value
// Close widget on KNX command
grp.listen('2/3/4', function(object, state) {
if (state == 'value' && object.value == false ) {
// Command to display widget
$("#widget-27").css("display", "none").css("opacity", "0");
}
}, true); // set to true to execute on same object value
Jean-Marc