Add click event, modified main.js