I am creating a jquery mobile listview that can be filtered on it's content like below:
<ul data-filter="true" ...>
<li class='thisrowshouldnotbefilteredout'></li>
<li>content to filter on</li>
......
......
</ul>
You can override filter logic like this:
$("#mylist").listview('option', 'filterCallback', customSearch);
var customSearch = function(text, searchValue, item) {
return text.toLowerCase().indexOf( searchValue) === -1;
}
Any function defined for the callback will be provided three arguments. First, the text of the current list item, second the value being searched for, and third the list item being filtered. A truthy value will result in a hidden list item. The default callback which filters entries without the searchValue as a substring is described below.
Use it to skip your header li element. Modify it as you wish.
Example and more about this can be found here: http://jquerymobile.com/test/docs/lists/docs-lists.html