Element.Event.Pseudos

This demo will show you how to use the provided :once pseudo event and how to create a custom pseudo event.

  • Demo
  • Docs
  • CSS
  • HTML
  • JavaScript

Only fires once:

Click me and I'll just fire once and no more!

:alt Pseudo

Hold the Alt key and click a block to toggle the .active class.

Multiple Pseudos

This demo uses the keydown:relay(textarea):keys(enter):once event:

:pause Pseudo

This Pseudo Event prevents the event function from firing immediately after every keystroke. :pause instead waits for a pause in keystrokes of a optional amount of time (in milliseconds) to pass before firing. This is for example very useful when you want to validate the field when the user is ready typing, or if you do some Requests in an efficient way.

Spinner

Documentation References: