I have a text input search that is supposed to filter divs based on the title of the div. Here is the code that is not working:
$('.contact-name').each(function(){
var txt = $('#search-criteria').val();
$('this').find(txt).show()
});
What am I doing wrong?
EDIT: To clarify the variable txt is what the user has typed in the input field. An example would be if txt was Cha I would want this row to show:
<div class="contact-name"><h3><a href="##">Charles Smith</a></h3></div>