Add click event for adding variable