#359 refactoring onclick event

#359 solved.