sets a popup message next to the switch when a cursor points to it
// tooltip as a boolean
webix.ui({
view:"switch", value:0,
tooltip:true
});
// tooltip as a string
webix.ui({
view:"switch", value:0,
tooltip:"#value#"
});
// tooltip as a function
webix.ui({
view:"switch", value:0,
tooltip:function(obj){
return obj.value;
}
});
// tooltip as a configuration object
webix.ui({
view:"switch", value:0,
tooltip:{
template:"#value#", dx:0, dy:-30
}
});
If you define the tooltip as a function, it receives the configuration object of a switch.
If you define the tooltip as an object, you can configure the tooltip and define its template as a string or a function.