在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称(OpenSource Name):commadelimited/autoComplete.js开源软件地址(OpenSource Url):https://github.com/commadelimited/autoComplete.js开源编程语言(OpenSource Language):JavaScript 82.1%开源软件介绍(OpenSource Introduction):autoComplete.jsAutoComplete is a jQuery Mobile plugin which allows developers to add autoComplete search boxes to your project. Based on the blog entry of Raymond Camden (@cfjedimaster). ExampleView a simple demo of autoComplete Quick startClone the git repo - Usage & Documentation
AutoComplete can access local arrays or remote data sources. AutoComplete.js can read data in one of two ways: simple or complex. Simple data should be returned from the source in the following format:
Causing the resulting code to look like this: Complex data allows developers to specify which value goes where. This option requires data to be returned as an array of objects:
Causing the resulting code to look like this: Data-autocomplete attributeIn 1.4.3 a new "data-autocomplete" property was added to the anchor tag contained with each list item. This attribute contains a serialized version of each item in the array. See "callback-plus.html" for usage. CallbackWhen using the optional callback function autoComplete will only execute code found within the callback. The click event object is passed into the callback function for use in accessing the information contained in the selection. Here's one use case:
Utility Methodsupdate - takes an object containing AutoComplete settings to updateThis method allows you to update AutoComplete settings for an element after the plugin has been initialized.
clearThis method will clear the "target" listview. Useful if you need to empty the list in response to other events.
destroyThis method will clean up any bound events or data stored on the element.
EventstargetUpdated.autocompleteEvent fired each time the target listview is updated. A potential use is to bind to this event and scroll to the top of the page so that the list of completions is not completely hidden behind the soft/virtual keyboard.
targetCleared.autocompleteEvent fired when the target listview is emptied (no completions to display). ContributingYou are invited to contribute code and suggestions to this project. The more the merrier. Project Info
3rd party libraries required:
Custom bits:MIT/GPL license |
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论