Custom Javascript

Let Unpoly pair HTML elements with your custom Javascript behavior. Your elements will automatically be compiled whenever a page fragment is updated.

  The time is <span class="timestamp"></span>
up.compiler('.timestamp', (element) => {
  var now = new Date()
  element.innerText = now
This website uses cookies to improve usability and analyze traffic.
I accept or learn more