change_visibility
This commit is contained in:
parent
b4dbf933cd
commit
e9b9e6fd32
11
changeVisibility.js
Normal file
11
changeVisibility.js
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
function changeVisibility(element) {
|
||||||
|
|
||||||
|
if (typeof element === "string") {
|
||||||
|
element = document.getElementById(element);
|
||||||
|
}
|
||||||
|
if (element) {
|
||||||
|
element.hidden = !(element.hidden);
|
||||||
|
} else {
|
||||||
|
console.log("In changeVisibility: element not found");
|
||||||
|
}
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user