Auto-associative full effect based on jquery text box. This is a simple to use jquery AutoComplete plug-in, you can define index keywords, you can set the width of the input box, support search callback function. As follows:
Online preview Source Download
The implemented code.
HTML code:
<DivID= "Demo"> <Divclass= "wrapper"> <H3>Try typing "love programming."</H3> <DivID= "Search-form"></Div> <DivID= "message"></Div> </Div> </Div>
JS Code:
var proposals = [' at ', ' boat ', ' bear ', ' chief ', ' Dog ', ' drink ', ' elephant ', ' fruit ', ' grave ', ' hotel ', ' illness ', ' London ', ' motorbike ', ' love programming material ', ' Love programming jquery ', ' Webmaster Love programming w2bc.com ']; $ (document). Ready (function () { $ (' #search-form '). AutoComplete ({ hints: Proposals ,+,function (text) { $ (' # Message '). HTML (' Selected: <b> ' + text + ' </b> ');});}) ;
Via:http://www.w2bc.com/article/2015-12-01-jquery-input-token-compete
Auto-associative full effect based on jquery-autocomplete text box