0
Some time ago I even asked this question here in the forum, where they answered link and helped me a lot.
Stayed that way:
#mostrar {
display: none;
}
#idfornecedor:not(:placeholder-shown):hover + #mostrar {
display: block;
}
.div_teste {
width: 350px;
height: 120px;
background: #ffffff;
/* position: absolute; */
z-index: 100;
top: 30%;
left: 40%;
border: 1px solid;
}
<div id="passarmouse">
<input type="text" class="form-control" name="FornecedorID" id="idfornecedor" placeholder="campo vazio" />
<div class="col-md-5 div_teste" id="mostrar">
<div class="col-md-12">
<label class="control-label" id="fornecedor">teste</label>
</div>
<div class="col-md-12">
<label class="control-label" id="nomefornecedor">teste</label>
</div>
<div class="col-md-12">
<label class="control-label" id="ruafornecedor">teste</label>
<label class="control-label" id="nfornecedor">teste</label>
</div>
<div class="col-md-12">
<label class="control-label" id="bairrofornecedor">teste</label>
<label class="control-label" id="cidadefornecedor">teste</label>
</div>
</div>
</div>
Only it will have a text that I will insert in idfornecedor
that when it’s him, I don’t want her div
be shown equal when it is not filled in. There is some way to do this based on the code I already have ?
Only with Javascript. But, which text will you insert? It was not very clear.
– Sam
When it searches and does not find the value in the database it returns
"Não encontrado, pesquise novamente."
, That’s where I wish you wouldn’t show thediv
floating– Mariana
I’ll leave it to another friend to try to solve because I could not understand what you want to do. : D
– Sam
it would not be better to put a data-status="Valid/invalid" in the input depending on whether or not it finds what was searched, ai vc shows or not the div using this value as selector by css
– hugocsl
@hugocsl I will check, I posted my code, because I wanted to know if I could do something on top of what I already have, without much impact.
– Mariana