Automatic Association and completion effects based on jQuery-autocomplete text box and jquery text box Effects
Auto-join Effect Based on jQuery text box. This is a simple jQuery Automatic completion plug-in that can define index keywords, set the width and height of the input box, and support the search callback function. As follows:
Download Online Preview source code
Implementation code.
Html code:
<Div id = "demo"> <div class = "wrapper">
Js Code:
Var proposals = ['at', 'boat', 'bear ', 'chief', 'dog', 'drink', 'elephant ', 'fruit', 'Grave ', 'Hotel ', 'illness', 'London ', 'motorbike', 'Love programming times', 'Love programming jquery ', 'webmaster loves programming w2bc.com']; $ (document ). ready (function () {$ ('# search-form '). autocomplete ({hints: proposals, width: 300, height: 30, onSubmit: function (text) {detail ('{message'}.html ('selected: <B> '+ text +' </B> ');}});});
Via: http://www.w2bc.com/article/2015-12-01-jquery-input-token-compete