aboutsummaryrefslogtreecommitdiffstats
path: root/demos/autocomplete
diff options
context:
space:
mode:
authorScott González <scott.gonzalez@gmail.com>2012-09-10 11:33:46 -0400
committerScott González <scott.gonzalez@gmail.com>2012-09-10 11:33:46 -0400
commit303f20e1b3c977d75047bed1a3533a180d73fab5 (patch)
treec8cf97b57f2493313dfd92c1dfceedb29d137d67 /demos/autocomplete
parent9e259c6e5369bf272dd14df7aea1372c5b064300 (diff)
downloadjquery-ui-303f20e1b3c977d75047bed1a3533a180d73fab5.tar.gz
jquery-ui-303f20e1b3c977d75047bed1a3533a180d73fab5.zip
Demos: Cleanup.
Diffstat (limited to 'demos/autocomplete')
-rw-r--r--demos/autocomplete/categories.html15
-rw-r--r--demos/autocomplete/combobox.html11
-rw-r--r--demos/autocomplete/custom-data.html19
-rw-r--r--demos/autocomplete/default.html11
-rw-r--r--demos/autocomplete/folding.html11
-rw-r--r--demos/autocomplete/index.html36
-rw-r--r--demos/autocomplete/maxheight.html11
-rw-r--r--demos/autocomplete/multiple-remote.html11
-rw-r--r--demos/autocomplete/multiple.html11
-rw-r--r--demos/autocomplete/remote-jsonp.html11
-rw-r--r--demos/autocomplete/remote-with-cache.html11
-rw-r--r--demos/autocomplete/remote.html11
-rw-r--r--demos/autocomplete/xml.html11
13 files changed, 49 insertions, 131 deletions
diff --git a/demos/autocomplete/categories.html b/demos/autocomplete/categories.html
index 5d973a190..1138a16ef 100644
--- a/demos/autocomplete/categories.html
+++ b/demos/autocomplete/categories.html
@@ -1,4 +1,4 @@
-<!DOCTYPE html>
+<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
@@ -29,7 +29,7 @@
ul.append( "<li class='ui-autocomplete-category'>" + item.category + "</li>" );
currentCategory = item.category;
}
- that._renderItem( ul, item );
+ that._renderItemData( ul, item );
});
}
});
@@ -57,16 +57,11 @@
</head>
<body>
-<div class="demo">
- <label for="search">Search: </label>
- <input id="search">
-</div><!-- End demo -->
-
-
+<label for="search">Search: </label>
+<input id="search">
<div class="demo-description">
<p>A categorized search result. Try typing "a" or "n".</p>
-</div><!-- End demo-description -->
-
+</div>
</body>
</html>
diff --git a/demos/autocomplete/combobox.html b/demos/autocomplete/combobox.html
index 40050c7b8..64d49bcc5 100644
--- a/demos/autocomplete/combobox.html
+++ b/demos/autocomplete/combobox.html
@@ -1,4 +1,4 @@
-<!DOCTYPE html>
+<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
@@ -172,8 +172,6 @@
</head>
<body>
-<div class="demo">
-
<div class="ui-widget">
<label>Your preferred programming language: </label>
<select id="combobox">
@@ -204,15 +202,10 @@
</div>
<button id="toggle">Show underlying select</button>
-</div><!-- End demo -->
-
-
-
<div class="demo-description">
<p>A custom widget built by composition of Autocomplete and Button. You can either type something into the field to get filtered suggestions based on your input, or use the button to get the full list of selections.</p>
<p>The input is read from an existing select-element for progressive enhancement, passed to Autocomplete with a customized source-option.</p>
<p>This is not a supported or even complete widget. Its purely for demoing what autocomplete can do with a bit of customization. <a href="http://www.learningjquery.com/2010/06/a-jquery-ui-combobox-under-the-hood">For a detailed explanation of how the widget works, check out this Learning jQuery article.</a></p>
-</div><!-- End demo-description -->
-
+</div>
</body>
</html>
diff --git a/demos/autocomplete/custom-data.html b/demos/autocomplete/custom-data.html
index cb89bd544..f73709b4c 100644
--- a/demos/autocomplete/custom-data.html
+++ b/demos/autocomplete/custom-data.html
@@ -1,4 +1,4 @@
-<!DOCTYPE html>
+<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
@@ -77,20 +77,15 @@
</head>
<body>
-<div class="demo">
- <div id="project-label">Select a project (type "j" for a start):</div>
- <img id="project-icon" src="images/transparent_1x1.png" class="ui-state-default" alt="">
- <input id="project">
- <input type="hidden" id="project-id">
- <p id="project-description"></p>
-</div><!-- End demo -->
-
-
+<div id="project-label">Select a project (type "j" for a start):</div>
+<img id="project-icon" src="images/transparent_1x1.png" class="ui-state-default" alt="">
+<input id="project">
+<input type="hidden" id="project-id">
+<p id="project-description"></p>
<div class="demo-description">
<p>You can use your own custom data formats and displays by simply overriding the default focus and select actions.</p>
<p>Try typing "j" to get a list of projects or just press the down arrow.</p>
-</div><!-- End demo-description -->
-
+</div>
</body>
</html>
diff --git a/demos/autocomplete/default.html b/demos/autocomplete/default.html
index e9c38ff95..0f6744b33 100644
--- a/demos/autocomplete/default.html
+++ b/demos/autocomplete/default.html
@@ -1,4 +1,4 @@
-<!DOCTYPE html>
+<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
@@ -44,22 +44,15 @@
</script>
</head>
<body>
-
-<div class="demo">
<div class="ui-widget">
<label for="tags">Tags: </label>
<input id="tags">
</div>
-</div><!-- End demo -->
-
-
-
<div class="demo-description">
<p>The Autocomplete widgets provides suggestions while you type into the field. Here the suggestions are tags for programming languages, give "ja" (for Java or JavaScript) a try.</p>
<p>The datasource is a simple JavaScript array, provided to the widget using the source-option.</p>
-</div><!-- End demo-description -->
-
+</div>
</body>
</html>
diff --git a/demos/autocomplete/folding.html b/demos/autocomplete/folding.html
index e2c8938a2..2e54ad672 100644
--- a/demos/autocomplete/folding.html
+++ b/demos/autocomplete/folding.html
@@ -1,4 +1,4 @@
-<!DOCTYPE html>
+<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
@@ -41,8 +41,6 @@
</head>
<body>
-<div class="demo">
-
<div class="ui-widget">
<form>
<label for="developer">Developer: </label>
@@ -50,14 +48,9 @@
</form>
</div>
-</div><!-- End demo -->
-
-
-
<div class="demo-description">
<p>The autocomplete field uses a custom source option which will match results that have accented characters even when the text field doesn't contain accented characters. However if the you type in accented characters in the text field it is smart enough not to show results that aren't accented.</p>
<p>Try typing "Jo" to see "John" and "Jörn", then type "Jö" to see only "Jörn".</p>
-</div><!-- End demo-description -->
-
+</div>
</body>
</html>
diff --git a/demos/autocomplete/index.html b/demos/autocomplete/index.html
index 77f801996..faa18d438 100644
--- a/demos/autocomplete/index.html
+++ b/demos/autocomplete/index.html
@@ -1,27 +1,25 @@
-<!DOCTYPE html>
+<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>jQuery UI Autocomplete Demos</title>
- <link rel="stylesheet" href="../demos.css">
</head>
<body>
- <div class="demos-nav">
- <h4>Examples</h4>
- <ul>
- <li class="demo-config-on"><a href="default.html">Default functionality</a></li>
- <li><a href="remote.html">Remote datasource</a></li>
- <li><a href="remote-with-cache.html">Remote with caching</a></li>
- <li><a href="remote-jsonp.html">Remote JSONP datasource</a></li>
- <li><a href="maxheight.html">Scrollable results</a></li>
- <li><a href="combobox.html">Combobox</a></li>
- <li><a href="custom-data.html">Custom data and display</a></li>
- <li><a href="xml.html">XML data parsed once</a></li>
- <li><a href="categories.html">Categories</a></li>
- <li><a href="folding.html">Accent folding</a></li>
- <li><a href="multiple.html">Multiple values</a></li>
- <li><a href="multiple-remote.html">Multiple, remote</a></li>
- </ul>
- </div>
+
+<ul>
+ <li><a href="default.html">Default functionality</a></li>
+ <li><a href="remote.html">Remote datasource</a></li>
+ <li><a href="remote-with-cache.html">Remote with caching</a></li>
+ <li><a href="remote-jsonp.html">Remote JSONP datasource</a></li>
+ <li><a href="maxheight.html">Scrollable results</a></li>
+ <li><a href="combobox.html">Combobox</a></li>
+ <li><a href="custom-data.html">Custom data and display</a></li>
+ <li><a href="xml.html">XML data parsed once</a></li>
+ <li><a href="categories.html">Categories</a></li>
+ <li><a href="folding.html">Accent folding</a></li>
+ <li><a href="multiple.html">Multiple values</a></li>
+ <li><a href="multiple-remote.html">Multiple, remote</a></li>
+</ul>
+
</body>
</html>
diff --git a/demos/autocomplete/maxheight.html b/demos/autocomplete/maxheight.html
index bb27e2a0d..fbf886baa 100644
--- a/demos/autocomplete/maxheight.html
+++ b/demos/autocomplete/maxheight.html
@@ -1,4 +1,4 @@
-<!DOCTYPE html>
+<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
@@ -59,20 +59,13 @@
</head>
<body>
-<div class="demo">
-
<div class="ui-widget">
<label for="tags">Tags: </label>
<input id="tags">
</div>
-</div><!-- End demo -->
-
-
-
<div class="demo-description">
<p>When displaying a long list of options, you can simply set the max-height for the autocomplete menu to prevent the menu from growing too large. Try typing "a" or "s" above to get a long list of results that you can scroll through.</p>
-</div><!-- End demo-description -->
-
+</div>
</body>
</html>
diff --git a/demos/autocomplete/multiple-remote.html b/demos/autocomplete/multiple-remote.html
index d77315036..f33aba9a4 100644
--- a/demos/autocomplete/multiple-remote.html
+++ b/demos/autocomplete/multiple-remote.html
@@ -1,4 +1,4 @@
-<!DOCTYPE html>
+<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
@@ -67,21 +67,14 @@
</head>
<body>
-<div class="demo">
-
<div class="ui-widget">
<label for="birds">Birds: </label>
<input id="birds" size="50">
</div>
-</div><!-- End demo -->
-
-
-
<div class="demo-description">
<p>Usage: Enter at least two characters to get bird name suggestions. Select a value to continue adding more names.</p>
<p>This is an example showing how to use the source-option along with some events to enable autocompleting multiple values into a single field.</p>
-</div><!-- End demo-description -->
-
+</div>
</body>
</html>
diff --git a/demos/autocomplete/multiple.html b/demos/autocomplete/multiple.html
index ff0aee0e8..54bc0eeec 100644
--- a/demos/autocomplete/multiple.html
+++ b/demos/autocomplete/multiple.html
@@ -1,4 +1,4 @@
-<!DOCTYPE html>
+<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
@@ -80,21 +80,14 @@
</head>
<body>
-<div class="demo">
-
<div class="ui-widget">
<label for="tags">Tag programming languages: </label>
<input id="tags" size="50">
</div>
-</div><!-- End demo -->
-
-
-
<div class="demo-description">
<p>Usage: Type something, eg. "j" to see suggestions for tagging with programming languages. Select a value, then continue typing to add more.</p>
<p>This is an example showing how to use the source-option along with some events to enable autocompleting multiple values into a single field.</p>
-</div><!-- End demo-description -->
-
+</div>
</body>
</html>
diff --git a/demos/autocomplete/remote-jsonp.html b/demos/autocomplete/remote-jsonp.html
index 7a9fa486a..f1a079a55 100644
--- a/demos/autocomplete/remote-jsonp.html
+++ b/demos/autocomplete/remote-jsonp.html
@@ -1,4 +1,4 @@
-<!DOCTYPE html>
+<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
@@ -63,8 +63,6 @@
</head>
<body>
-<div class="demo">
-
<div class="ui-widget">
<label for="city">Your city: </label>
<input id="city">
@@ -76,14 +74,9 @@
<div id="log" style="height: 200px; width: 300px; overflow: auto;" class="ui-widget-content"></div>
</div>
-</div><!-- End demo -->
-
-
-
<div class="demo-description">
<p>The Autocomplete widgets provides suggestions while you type into the field. Here the suggestions are cities, displayed when at least two characters are entered into the field.</p>
<p>In this case, the datasource is the <a href="http://geonames.org">geonames.org webservice</a>. While only the city name itself ends up in the input after selecting an element, more info is displayed in the suggestions to help find the right entry. That data is also available in callbacks, as illustrated by the Result area below the input.</p>
-</div><!-- End demo-description -->
-
+</div>
</body>
</html>
diff --git a/demos/autocomplete/remote-with-cache.html b/demos/autocomplete/remote-with-cache.html
index 79d4794ea..a2af90d67 100644
--- a/demos/autocomplete/remote-with-cache.html
+++ b/demos/autocomplete/remote-with-cache.html
@@ -1,4 +1,4 @@
-<!DOCTYPE html>
+<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
@@ -42,21 +42,14 @@
</head>
<body>
-<div class="demo">
-
<div class="ui-widget">
<label for="birds">Birds: </label>
<input id="birds">
</div>
-</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>Similar to the remote datasource demo, though this adds some local caching to improve performance. The cache here saves just one query, and could be extended to cache multiple values, one for each term.</p>
-</div><!-- End demo-description -->
-
+</div>
</body>
</html>
diff --git a/demos/autocomplete/remote.html b/demos/autocomplete/remote.html
index 5086ad0b0..82bada235 100644
--- a/demos/autocomplete/remote.html
+++ b/demos/autocomplete/remote.html
@@ -1,4 +1,4 @@
-<!DOCTYPE html>
+<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
@@ -37,8 +37,6 @@
</head>
<body>
-<div class="demo">
-
<div class="ui-widget">
<label for="birds">Birds: </label>
<input id="birds">
@@ -49,14 +47,9 @@
<div id="log" style="height: 200px; width: 300px; overflow: auto;" class="ui-widget-content"></div>
</div>
-</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>
-</div><!-- End demo-description -->
-
+</div>
</body>
</html>
diff --git a/demos/autocomplete/xml.html b/demos/autocomplete/xml.html
index 1fc0b8da3..61c5edb8d 100644
--- a/demos/autocomplete/xml.html
+++ b/demos/autocomplete/xml.html
@@ -1,4 +1,4 @@
-<!DOCTYPE html>
+<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
@@ -48,8 +48,6 @@
</head>
<body>
-<div class="demo">
-
<div class="ui-widget">
<label for="birds">London matches: </label>
<input id="birds" />
@@ -60,14 +58,9 @@
<div id="log" style="height: 200px; width: 300px; overflow: auto;" class="ui-widget-content"></div>
</div>
-</div><!-- End demo -->
-
-
-
<div class="demo-description">
<p>This demo shows how to retrieve some XML data, parse it using jQuery's methods, then provide it to the autocomplete as the datasource.</p>
<p>This should also serve as a reference on how to parse a remote XML datasource - the parsing would just happen for each request within the source-callback.</p>
-</div><!-- End demo-description -->
-
+</div>
</body>
</html>