Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>This one very good! <a href="https://github.com/wuyuntao/jquery-autosuggest/" rel="nofollow noreferrer">https://github.com/wuyuntao/jquery-autosuggest/</a></p> <blockquote> <h2>How To Use It</h2> <p>Obviously you need to make sure you have the latest jQuery library (at least 1.3) already loaded in your page. After that it's really simple, just add the following code to your page (make sure to wrap your code in jQuery's ready function): </p> <pre><code>$(function(){ $("input[type=text]").autoSuggest(data); }); </code></pre> <p>The above line of code will apply AutoSuggest to all text type <code>input</code> elements on the page. Each one will be using the same set of Data. If you want to have multiple AutoSuggest fields on your page that use different sets of Data, make sure you select them separately. Like this: </p> <pre><code>$(function(){ $("div.someClass input").autoSuggest(data); $("#someID input").autoSuggest(other_data); }); </code></pre> <p>Doing the above will allow you to pass in different options and different Data sets. Below is an example of using AutoSuggest with a Data Object and other various options:</p> <pre><code>var data = {items: [ {value: "21", name: "Mick Jagger"}, {value: "43", name: "Johnny Storm"}, {value: "46", name: "Richard Hatch"}, {value: "54", name: "Kelly Slater"}, {value: "55", name: "Rudy Hamilton"}, {value: "79", name: "Michael Jordan"} ]}; $("input[type=text]").autoSuggest(data.items, {selectedItemProp: "name", searchObjProps: "name"}); </code></pre> </blockquote>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload