For those who can't wait, Fiddle :)
I am developing this kind of logic and I know I will be using jQuery for this but the problem is I don't know how to do such thing or to start it.
I want everytime I type something on the input or the input has text I want the .search-dropdown will be shown. Also even if I copy & paste something on the input the .search-dropdown will also be shown. How do I do it ? I don't really know how to do it in jQuery :( Forgive me for it I'm still a newbie in jQuery world.
For better example just like the search bar in facebook everytime I type the search results will be shown :). Thanks in advance for your time and your answers :) Have a good day Sir/Mam.
By is my CSS and HTML code:
CSS:
.search-here{
width: 100%;
height: 30px;
border: 1px solid #000;
padding: 5px 10px
}
.search-dropdown{
width: 100%;
height: auto;
overflow: hidden;
background: #ececec;
border-radius: 2px;
margin-top: 5px;
display: none;
}
.search-dropdown a{
display: block;
padding: 5px;
border-bottom: 1px solid #dddddd;
text-decoration: none;
color: #000;
}
HTML:
<div class="box-a4">
<form>
<input type="text" placeholder="Search" class="search-here">
<div class="search-dropdown">
<a href="#">Lorem ipsum dolor sit amet, consectetur adipisicing elit.</a>
<a href="#">Dolorum a aperiam nemo ex fuga esse at expedita sed quo sequi voluptas labore.</a>
<a href="#">Dolorum a aperiam nemo ex fuga esse at expedita sed quo sequi voluptas labore, nihil assumenda quidem dolore illo, consequuntur neque quasi. Lorem ipsum dolor sit amet, consectetur adipisicing elit.</a>
</div>
</form>
</div>
Thank you :)