Akshay

Akshay

  • NA
  • 82
  • 47.1k

Quick Search

Nov 25 2014 5:32 AM
my html structure like this =>
 
 <input type="text" id="search_input"/>
 
<article class="article">
<h5>
 
<a>   Question </a>
 
</h5>
<p>
Answer 
</p>
 
</article>
 
script=>
 
$("#search_input").keyup(function() {
var userInput = $(this).val();
$(".article h5 a").map(function(index, value) {
$(value).toggle($(value).text().toLowerCase().indexOf(userInput) >= 0);
});
});
 
1 >Question=
how can i help u?
 
Answer =>
 By Solving My Problem
 
2)Question= What IS your Name
 Answer =>-Hament
 
Like Above i have may item like this ,when i write how so that time Question
as well as from Answer also ,i olny want to search it from
it search from Question ..
 
 
Means My Wronge Result Shows O/p Like 
 
Question=
how can i help u?
By Solving My Problem 
 Hament
 

Answers (1)