Skip to content

Function: show()

Overload 1

show(element): void

Defined in: dom.ts:195

Makes the given element visible by removing the hidden attribute.

Parameters

element

HTMLElement

The target element.

Returns

void

Example

ts
// HTML
<p id="message" hidden>Hello!</p>
// JS
const el = facile.getElement('#message');
facile.show(el);

Overload 2

show<K>(tag): void

Defined in: dom.ts:207

Makes the first element matching the given tag name visible by removing the hidden attribute. Does nothing if no element is found.

Type Parameters

K

K extends keyof HTMLElementTagNameMap

Parameters

tag

K

The HTML tag name to search for.

Returns

void

Example

ts
// HTML
<p hidden>Hello!</p>
// JS
facile.show('p');

Overload 3

show(selector): void

Defined in: dom.ts:219

Makes the first element matching the given CSS selector visible by removing the hidden attribute. Does nothing if no element is found.

Parameters

selector

string

A CSS selector string.

Returns

void

Example

ts
// HTML
<p id="message" hidden>Hello!</p>
// JS
facile.show('#message');