Hides or shows the given element with a smooth fading transition.

IMPORTANT: When constructed, it will remove any lisn-hide class from the element as a form of initialization.


To use with auto-widgets (HTML API) as part of a trigger specification:

  • Action name: "hide".
  • Accepted string arguments: none
  • Accepted options: none
<button id="btn">Show/hide</button>
<div data-lisn-on-click="@hide +target=#btn"></div>

Implements

Methods

Constructors

Properties

Methods

Constructors

Properties

do: () => Promise<void>

Hides the element with a smooth fade out transition.

toggle: () => Promise<void>

Shows the element if it is hidden, hides it otherwise.

undo: () => Promise<void>

Shows the element with a smooth fade in transition.