Added a click helper to the client code

It feels like everyone needs it. So why not put it in the `templates/client.js`?