Parameters
elementID - The ID name for a specific HTMLElement.
value - "visible" to show the element, "hidden" to hide.
Syntax
| JavaScript |
|
static Visibility(elementID, value)
|
Sets the element visibility.
Example
| JavaScript |
// Sets the element visibility.
Visibility()
{
// <body>
// <div id="testDiv"></div>
// </body>
const elementID = "testDiv";
let value = "hidden";
LJC.Visibility(elementID, value);
let element = LJC.Element(elementID);
let result = element.style.visibility;
// result:
// hidden;
value = "visible";
LJC.Visibility(elementID, value);
element = LJC.Element(elementID);
result = element.style.visibility;
// result:
// visible
}
|
Copyright © Lester J. Clark and Contributors.
Licensed under the MIT License.