Sandbox: JavaScript

Changing an input (with a maxlength property) will decrement a target's value

32 characters remaining
<div class="box">
  <input maxlength="32" data-trigger="charsRemaining"
    data-charsremaining-target="!body #chars-target"
    style="margin-right: 10px;"
  >
  <span id="chars-target">32</span> characters remaining
</div>

Delegator Options

Name type default description
target string ~ Selector to find character count to update.