Better way to manage the change of examples by mouse clicking on the menu