get click handler from opts