hid outputs switch

This commit is contained in:
Devaev Maxim
2020-12-02 05:01:13 +03:00
parent 744fd19db9
commit 7b32dc927d
6 changed files with 118 additions and 11 deletions

View File

@@ -141,6 +141,12 @@ export var tools = new function() {
el.value = value;
};
this.radioMakeItem = function(name, title, value) {
return `
<input type="radio" id="${name}-${value}" name="${name}" value="${value}" />
<label for="${name}-${value}">${title}</label>
`;
};
this.radioSetOnClick = function(name, callback) {
for (let el of $$$(`input[type="radio"][name="${name}"]`)) {
this.setOnClick(el, callback);