aboutsummaryrefslogtreecommitdiffstats
path: root/demos/autocomplete/remote.html
diff options
context:
space:
mode:
authorScott González <scott.gonzalez@gmail.com>2010-09-09 22:24:52 -0400
committerScott González <scott.gonzalez@gmail.com>2010-09-09 22:33:28 -0400
commitdf932bbba35be7f2e6f741ee114644e536774a76 (patch)
tree967ba449667ca5ac54273482abcfa07e35dcf171 /demos/autocomplete/remote.html
parent83244d933c481c6abdb2f957172d991212321d16 (diff)
downloadjquery-ui-df932bbba35be7f2e6f741ee114644e536774a76.tar.gz
jquery-ui-df932bbba35be7f2e6f741ee114644e536774a76.zip
Autocomplete demos: Coding standards.
Diffstat (limited to 'demos/autocomplete/remote.html')
-rw-r--r--demos/autocomplete/remote.html46
1 files changed, 23 insertions, 23 deletions
diff --git a/demos/autocomplete/remote.html b/demos/autocomplete/remote.html
index 2dd0eb733..6c924fe91 100644
--- a/demos/autocomplete/remote.html
+++ b/demos/autocomplete/remote.html
@@ -1,30 +1,32 @@
<!DOCTYPE html>
<html lang="en">
<head>
- <meta charset="UTF-8" />
+ <meta charset="utf-8" />
<title>jQuery UI Autocomplete Remote datasource demo</title>
- <link type="text/css" href="../../themes/base/jquery.ui.all.css" rel="stylesheet" />
- <script type="text/javascript" src="../../jquery-1.4.2.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.core.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.widget.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.position.js"></script>
- <script type="text/javascript" src="../../ui/jquery.ui.autocomplete.js"></script>
- <link type="text/css" href="../demos.css" rel="stylesheet" />
- <style type="text/css">
+ <link rel="stylesheet" href="../../themes/base/jquery.ui.all.css">
+ <script src="../../jquery-1.4.2.js"></script>
+ <script src="../../ui/jquery.ui.core.js"></script>
+ <script src="../../ui/jquery.ui.widget.js"></script>
+ <script src="../../ui/jquery.ui.position.js"></script>
+ <script src="../../ui/jquery.ui.autocomplete.js"></script>
+ <link rel="stylesheet" href="../demos.css">
+ <style>
.ui-autocomplete-loading { background: white url('images/ui-anim_basic_16x16.gif') right center no-repeat; }
</style>
- <script type="text/javascript">
+ <script>
$(function() {
- function log(message) {
- $("<div/>").text(message).prependTo("#log");
- $("#log").attr("scrollTop", 0);
+ function log( message ) {
+ $( "<div/>" ).text( message ).prependTo( "#log" );
+ $( "#log" ).attr( "scrollTop", 0 );
}
-
- $("#birds").autocomplete({
+
+ $( "#birds" ).autocomplete({
source: "search.php",
minLength: 2,
- select: function(event, ui) {
- log(ui.item ? ("Selected: " + ui.item.value + " aka " + ui.item.id) : "Nothing selected, input was " + this.value);
+ select: function( event, ui ) {
+ log( ui.item ?
+ "Selected: " + ui.item.value + " aka " + ui.item.id :
+ "Nothing selected, input was " + this.value );
}
});
});
@@ -46,13 +48,11 @@
</div><!-- End demo -->
+
+
<div class="demo-description">
-<p>
-The Autocomplete widgets provides suggestions while you type into the field. Here the suggestions are bird names, displayed when at least two characters are entered into the field.
-</p>
-<p>
-The datasource is a server-side script which returns JSON data, specified via a simple URL for the source-option. In addition, the minLength-option is set to 2 to avoid queries that would return too many results and the select-event is used to display some feedback.
-</p>
+<p>The Autocomplete widgets provides suggestions while you type into the field. Here the suggestions are bird names, displayed when at least two characters are entered into the field.</p>
+<p>The datasource is a server-side script which returns JSON data, specified via a simple URL for the source-option. In addition, the minLength-option is set to 2 to avoid queries that would return too many results and the select-event is used to display some feedback.</p>
</div><!-- End demo-description -->
</body>