add click event for links