Add the click listener to the links.