Skip to content

Commit c21051b

Browse files
committed
Valid css and xhtml
1 parent 460f4c6 commit c21051b

File tree

2 files changed

+20
-17
lines changed

2 files changed

+20
-17
lines changed

autocomplete.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
label {display:block}
1010

1111
/* Big bird example */
12-
ul.mybigbirdlist { display:cell }
12+
ul.mybigbirdlist { display: table-cell }
1313

1414
/* Prettify changes */
1515
pre.prettyprint {

autocomplete.html

Lines changed: 19 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -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({
145149
list: birds_list,
146150
adjustWidth:false,
147-
wrapper: '&lt;ul class="jq-ui-autocomplete mybigbirdlist"&gt;</ul>',
151+
wrapper: '&lt;ul class="jq-ui-autocomplete mybigbirdlist"&gt;&lt;/ul&gt;',
148152
});
149153

150154
</code></pre>
151-
And the css:
155+
<p>And the css:</p>
152156
<pre class="prettyprint lang-css"><code>
153157
ul.mybigbirdlist { display:cell }
154158
</code></pre>
155-
</p>
156159

157160
<h2>Source &amp; downloads</h2>
158161
<p>

0 commit comments

Comments
 (0)