@@ -27,11 +27,14 @@ <h2>Examples</h2>
2727 < h3 > A really simple example</ h3 >
2828 < p > This example uses a local array and the dafault options.</ p >
2929 < form onsubmit ="alert('Supposed to submit now...'); return false; " action ="/ ">
30+ < div >
3031 < label for ="bird-name ">
3132 Local list < span class ="included-options "> ("Barred Antshrike", "Bananaquit", "Copper Rumped Hummingbird", "Whimbrel")</ span > :
3233 </ label >
3334 < input id ="bird-name " name ="bird-name " type ="text " class ="autocomplete birds " />
35+
3436 < input type ="submit " value ="Submit "/>
37+ </ div >
3538 </ form >
3639 < p > The source code :</ p >
3740 < pre class ="prettyprint "> < code >
@@ -43,10 +46,10 @@ <h3>A really simple example</h3>
4346 < h3 > Remote JSON example</ h3 >
4447 < p > Basic tweaking and getting the results from a remote web service</ p >
4548 < ul >
46- < li > Changing the default list elements type by passing the .text object to matcher and 'insertText' / 'templateText'.</ li >
47- < li > Overriding the default "match" function with a case-insensitive version</ li >
48- < li > Using a custom template for the results box (through the "templateText")</ li >
49- < li > Uses the < code > autocomplete.ext</ code > ajax and templateText plugins.
49+ < li > Changing the default list elements type by passing the .text object to matcher and 'insertText' / 'templateText'.</ li >
50+ < li > Overriding the default "match" function with a case-insensitive version</ li >
51+ < li > Using a custom template for the results box (through the "templateText")</ li >
52+ < li > Uses the < code > autocomplete.ext</ code > ajax and templateText plugins.</ li >
5053 </ ul >
5154 < form onsubmit ="alert('Supposed to submit now...'); return false; " action ="/ ">
5255 < p >
@@ -80,11 +83,12 @@ <h3>A more advanced example</h3>
8083 < p >
8184 Tweaking the inner working of the plugin (as above) but with more powerful options
8285 (notice the "match" and the "templateText" options).
86+ </ p >
8387< ul >
8488< li > Modifies the once-per-input matcher to carry information about the text typed.</ li >
8589< li > The match function adds information to the matched element to be used when templating it.</ li >
8690</ ul >
87- </ p >
91+
8892 < form onsubmit ="alert('Supposed to submit now...'); return false; " action ="/ ">
8993 < p >
9094 < label for ="weird-name ">
@@ -131,28 +135,27 @@ <h3>A more advanced example</h3>
131135</ code > </ pre >
132136< h3 > Width of the autocomplete box</ h3 >
133137< p > Did you find too big bird names? Let's the css adjust the size of the autocomplete box.</ p >
134- < form onsubmit ="alert('Supposed to submit now...'); return false; " action ="/ ">
138+ < form onsubmit ="alert('Supposed to submit now...'); return false; " action ="/ "> < div >
135139 < label for ="bird-name2 ">
136- Local list
137- < span class ="included-options "> ("Barred Antshrike", "Bananaquit", "Copper Rumped Hummingbird", "Whimbrel")</ span > :
138- </ label >
139- < input id ="bird-name2 " name ="bird-name2 " type ="text " class ="autocomplete birds2 " />
140- < input type ="submit " value ="Submit "/>
141- </ form >
142- < p > The source code :
140+ Local list
141+ < span class ="included-options "> ("Barred Antshrike", "Bananaquit", "Copper Rumped Hummingbird", "Whimbrel")</ span > :
142+ </ label >
143+ < input id ="bird-name2 " name ="bird-name2 " type ="text " class ="autocomplete birds2 " />
144+ < input type ="submit " value ="Submit "/>
145+ </ div > </ form >
146+ < p > The source code : </ p >
143147< pre class ="prettyprint lang-js "> < code >
144148$("input.autocomplete.birds2").autocomplete({
145149list: birds_list,
146150adjustWidth:false,
147- wrapper: '<ul class="jq-ui-autocomplete mybigbirdlist">< /ul > ',
151+ wrapper: '<ul class="jq-ui-autocomplete mybigbirdlist">< /ul> ',
148152});
149153
150154</ code > </ pre >
151- And the css:
155+ < p > And the css:</ p >
152156< pre class ="prettyprint lang-css "> < code >
153157ul.mybigbirdlist { display:cell }
154158</ code > </ pre >
155- </ p >
156159
157160 < h2 > Source & downloads</ h2 >
158161 < p >
0 commit comments