DOM event handler for bricks and walls.