Debian Codegraph @

demos/autocomplete/maxheight.html

raw symbols SCIP
1 <!doctype html>
2 <html lang="en">
3 <head>
4 <meta charset="utf-8">
5 <meta name="viewport" content="width=device-width, initial-scale=1">
6 <title>jQuery UI Autocomplete - Scrollable results</title>
7 <link rel="stylesheet" href="../../themes/base/all.css">
8 <link rel="stylesheet" href="../demos.css">
9 <style>
10 .ui-autocomplete {
11 max-height: 100px;
12 overflow-y: auto;
13 /* prevent horizontal scrollbar */
14 overflow-x: hidden;
15 }
16 </style>
17 <script src="../../external/requirejs/require.js"></script>
18 <script src="../bootstrap.js">
19 var availableTags = [
20 "ActionScript",
21 "AppleScript",
22 "Asp",
23 "BASIC",
24 "C",
25 "C++",
26 "Clojure",
27 "COBOL",
28 "ColdFusion",
29 "Erlang",
30 "Fortran",
31 "Groovy",
32 "Haskell",
33 "Java",
34 "JavaScript",
35 "Lisp",
36 "Perl",
37 "PHP",
38 "Python",
39 "Ruby",
40 "Scala",
41 "Scheme"
42 ];
43 $( "#tags" ).autocomplete({
44 source: availableTags
45 });
46 </script>
47 </head>
48 <body>
49
50 <div class="ui-widget">
51 <label for="tags">Tags: </label>
52 <input id="tags">
53 </div>
54
55 <div class="demo-description">
56 <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>
57 </div>
58 </body>
59 </html>