列表搜索插件:jQuery Searcher Plugin
jQuery Searcher Plugin這個插件能夠為任何列表類型的數據提供包含輸入框的搜索功能。
下表包含了可以傳給插件的所有可能的選項。
Name | Type | Description | </tr> </thead>|||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
itemSelector | string | jQuery selector for the data item element (e.g. tr, li ).Default: "tbody > tr" |
</tr>
|||||||||||||||||||||||||
textSelector | string | jQuery selector for the element which contains the text within the item element. If not specified the data item element is used instead. Default: "td" |
</tr>
|||||||||||||||||||||||||
inputSelector | string | jQuery selector for the input element which is used to filter the data. Default: "" |
</tr>
|||||||||||||||||||||||||
caseSensitive | bool | Determines whether the search should be case sensitive or not. Default: false |
</tr>
|||||||||||||||||||||||||
toggle | function | this function is called for each data item element when the text in the input changes. it is called with the data item element and a boolean value indicating whether the item contains the text or not. Default: function(item, containsText) { $(item).toggle(containsText); } |
</tr>
</tbody>
</table>