diff options
author | Scott González <scott.gonzalez@gmail.com> | 2010-09-09 22:24:52 -0400 |
---|---|---|
committer | Scott González <scott.gonzalez@gmail.com> | 2010-09-09 22:33:28 -0400 |
commit | df932bbba35be7f2e6f741ee114644e536774a76 (patch) | |
tree | 967ba449667ca5ac54273482abcfa07e35dcf171 /demos/autocomplete/combobox.html | |
parent | 83244d933c481c6abdb2f957172d991212321d16 (diff) | |
download | jquery-ui-df932bbba35be7f2e6f741ee114644e536774a76.tar.gz jquery-ui-df932bbba35be7f2e6f741ee114644e536774a76.zip |
Autocomplete demos: Coding standards.
Diffstat (limited to 'demos/autocomplete/combobox.html')
-rw-r--r-- | demos/autocomplete/combobox.html | 50 |
1 files changed, 24 insertions, 26 deletions
diff --git a/demos/autocomplete/combobox.html b/demos/autocomplete/combobox.html index b5309888e..d78d12155 100644 --- a/demos/autocomplete/combobox.html +++ b/demos/autocomplete/combobox.html @@ -1,27 +1,27 @@ <!DOCTYPE html> <html lang="en"> <head> - <meta charset="UTF-8" /> + <meta charset="utf-8" /> <title>jQuery UI Autocomplete Combobox 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.button.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"> - .ui-button { margin-left: -1px; } - .ui-button-icon-only .ui-button-text { padding: 0.35em; } - .ui-autocomplete-input { margin: 0; padding: 0.48em 0 0.47em 0.45em; } + <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.button.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-button { margin-left: -1px; } + .ui-button-icon-only .ui-button-text { padding: 0.35em; } + .ui-autocomplete-input { margin: 0; padding: 0.48em 0 0.47em 0.45em; } </style> - <script type="text/javascript"> + <script> (function( $ ) { $.widget( "ui.combobox", { _create: function() { - var self = this; - var select = this.element.hide(), + var self = this, + select = this.element.hide(), selected = select.children( ":selected" ), value = selected.val() ? selected.text() : ""; var input = $( "<input>" ) @@ -106,12 +106,12 @@ }); } }); - })(jQuery); + })( jQuery ); $(function() { - $("#combobox").combobox(); - $("#toggle").click(function() { - $("#combobox").toggle(); + $( "#combobox" ).combobox(); + $( "#toggle" ).click(function() { + $( "#combobox" ).toggle(); }); }); </script> @@ -152,13 +152,11 @@ </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>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> </div><!-- End demo-description --> </body> |