It is possible and sometimes necessary to create the click event along with the element. This is for example when selector based binding is not an option. The key part is to avoid the problem that Tobias was talking about by using .replaceWith()
on a single element. Note that this is just a proof of concept.
Magical ponies ♥