Zerolines.js

OneTime

Component to show only one time when HTML loaded. After user click dismiss button, component will not be shown until specified time expired. The specified time is stored in Local Storage.

Basic Structure

OneTime component requires one-time, dismiss trigger target. Default expired time is 31536000 seconds(365 days).

<div data-zl="one-time trigger-[#dissmissButtonId] expire-seconds-[20]" zl-cloak>
  <!-- OneTime Content Here -->
  <button id="dissmissButtonId" type="button">Dismiss button</button>
</div>

one-time

one-time needs a target element to dismiss.

Item Description

target-[SELECTOR]

*required

Specify the target element to be toggled. Put a CSS selector value between [ and ]. Double Quatation is not required. The target must be only one element.

Example

one-time target-[#dissmissButtonId]

expire-seconds-[SECONDS]

(optional)

Specify the expired seconds.

Example

one-time target-[#dissmissButtonId] expire-seconds-[3600]