I'm working on a project that requires a simple search engine. The idea is not to use plugins like "autocomplete" and "jquery ui" but to exploit the ":contains()" jQuery method.
Now, this function does exactly what I'm talking about.
$('#search').on('keyup',function(){
var v = $(this).val();
$('.element').hide();
$(".element:contains('"+v+"')").show();
});
The problem is, if a term is called "Foo" and I searching for "foo", the search engine do not returns any results... rightly. So I ask you if there is a way to solve this problem... using only jQuery.