On click event option added -- will not conflict with before or after close