Try HyperFixi

Click the buttons below. Each one is powered by a single _="..." attribute — no JavaScript files, no framework, no build step.

Toggle a class

<button _="on click toggle .active on me">Toggle</button>

Count clicks

<button _="on click
  set my.count to (my.count or 0) + 1
  then put 'Clicks: ' + my.count into me">
  Clicks: 0
</button>

Show and hide

<button _="on click toggle @hidden on #message">Show/Hide</button>
<p id="message">Hello from HyperFixi.</p>

Hello from HyperFixi.

All three examples run on one 7 KB script tag: hyperfixi-hybrid-complete.js

Install Choose a bundle 35+ examples Playground