Refactored click event handler to attribute.