added closeOnClickInside option, default value is true