Response title
This is preview!
function looseCharacterMatch(a, b) {a = a.split(""); b = b.substring(0,a.length); var c = true; for (var i = 0; i < a.length; i++) { if (b.replace(a[i], "") == b) { c = false; } b = b.replace(a[i], ""); } return c; } $("#plz").on("keyup", function () { var value = $(this).val().toLowerCase(); $("#list").children().each(function () { var text = $(this).text().toLowerCase(); $(this)[!looseCharacterMatch(value,text) ? 'hide':'show'](); }); });
© 2013 jQuery Foundation
Sponsored by and others.