exposed closeOnClick method. Closes #6