-
Book Overview & Buying
-
Table Of Contents
-
Feedback & Rating
jQuery Mobile Cookbook
By :
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.
Copy the full code of this recipe from the code/06/custom-search sources folder. This code can be launched using the URL http://localhost:8080/06/custom-search/main.html.
In main.html, create the following list of Mobile platforms. The list items also contain the OS manufacturer names in the attribute data-filtertext.
<div data-role...
Change the font size
Change margin width
Change background colour