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(fun
Luckily jQuery has a Contains selector:
$('.contact-name').each(function(){ var txt = $('#search-criteria').val(); $(this).find('div:contains("'+txt+'")').show() });