Vote count: 0
I try to search "ego d16" in a list like
- ego fara d16
- ego d16
- ego d22
- d16 ego
- para ego dela d16
Must result in lines (1, 2, 4, 5)...
My code is
var filter = $(this).val(); //like 'ego d16'
$("#rezultate li").each(function () {
if ($(this)[0].getAttribute('tags').toLowerCase().search(new RegExp(filter, "i")) < 0) {
$(this).hide();
} else {
$(this).show()
}
});
My actual result is only line (2)
How i can fix this? Thanks!
asked 1 min ago
Search multiple strings in sentences
Aucun commentaire:
Enregistrer un commentaire