Add onclick method for event items