1
Hi I’m doing the search bar of the site and the model of the bar and like this: has an image of a magnifying glass and when you click on the image, below it appears the input to type the search. I’m doing it in Javascript but I’m having problems. It happens like this when I click appears the most input when I click out it remains there, as I can make it disappear I tried to use if and Else, for loops but I got nothing. Can someone help me? Thank you!
<script>
function mostrarPesquisa(){
document.getElementById('pesquisa').style.display="inline-block";
}
</scripit>
<div id="menu">
<div id="dentromenu">
<ul class="menu">
<li class="activeItem"><a><img class="lupa" src="imagens/lupa.png" alt="Lupa" onClick="mostrarPesquisa()"></a>
<div id="caixapesquisa">
<form id="formpesquisa" action="" method="get">
<input id="pesquisa" class="pesquisa" type="text" value="" maxlength="" placeholder="Pesquisar..."><input id="btnpesquisa" type="hidden" src="imagens/lupa.png" value="">
</form>
</div>
</li>
Would not be
display = "none"
?– Laerte
Put more information about your code, the ideal would be to put also html.
– abfurlan
Yes more when I put the None display, and click off the input continues there, which is quite strange.
– Leonardo Silva