call callback function when clicked outside element