When the event is triggered, the element opens, but after that it does not close. How can I do that by clicking outside the "infoValue" tooltipValor close?
function formTips(){
var infoValor=document.getElementById("info-input-valor");
var tooltipValor=document.getElementById("tooltip-input-valor");
infoValor.onclick=function(){
if(tooltipValor.style.display!="block"){
tooltipValor.style.display="block";
}else{
tooltipValor.style.display="none";
}
}
}formTips();