Added a click event listener function