fix condition; vanilla js click; fix indentation