Added click events after updating html.

Fixes 191