O'Reilly logo

jQuery Mobile Cookbook by Chetan K Jain

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Creating a custom search filter

When a List Search Filter is used, the framework runs through the list items and displays the items that match the filter text. Alternate text can also be used with the search filter. The list item text is ignored when alternate text is used. The search is a generic match and any occurrence of the search value within the text is displayed in the result.

This recipe shows you how to use a search filter that can search both the list item text and alternate text. It also shows you how to configure search filters and also how to implement a custom search callback function that uses a custom search logic.

Getting ready

Copy the full code of this recipe from the code/06/custom-search sources folder. This code can be launched ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required