changing the click event to the div