Debian Codegraph @

examples/performance.html

raw
1 <!DOCTYPE html>
2 <!--[if lt IE 7]><html class="no-js lt-ie9 lt-ie8 lt-ie7"><![endif]-->
3 <!--[if IE 7]><html class="no-js lt-ie9 lt-ie8"><![endif]-->
4 <!--[if IE 8]><html class="no-js lt-ie9"><![endif]-->
5 <!--[if gt IE 8]><!--><html class="no-js"><!--<![endif]-->
6 <head>
7 <meta charset="utf-8">
8 <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
9 <title>Selectize.js Demo</title>
10 <meta name="description" content="">
11 <meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1">
12 <link rel="stylesheet" href="css/normalize.css">
13 <link rel="stylesheet" href="css/stylesheet.css">
14 <!--[if IE 8]><script src="js/es5.js"></script><![endif]-->
15 <script src="js/jquery.min.js"></script>
16 <script src="../dist/js/standalone/selectize.js"></script>
17 <script src="js/index.js"></script>
18 </head>
19 <body>
20 <div id="wrapper">
21 <h1>Selectize.js</h1>
22 <div class="demo">
23 <h2>Performance</h2>
24 <p>This shows how it performs with 25,000 items.</p>
25 <div class="control-group">
26 <label for="select-junk">Jumbled Mess:</label>
27 <select id="select-junk" placeholder="Start Typing..."></select>
28 </div>
29 <script>
30 // <select id="select-junk"></select>
31
32 var letters = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUV';
33 var options = [];
34 for (var i = 0; i < 25000; i++) {
35 var title = [];
36 for (var j = 0; j < 8; j++) {
37 title.push(letters.charAt(Math.round((letters.length - 1) * Math.random())));
38 }
39 options.push({
40 id: i,
41 title: title.join('')
42 });
43 }
44
45 $('#select-junk').selectize({
46 maxItems: null,
47 maxOptions: 100,
48 valueField: 'id',
49 labelField: 'title',
50 searchField: 'title',
51 sortField: 'title',
52 options: options,
53 create: false
54 });
55 </script>
56 </div>
57 </div>
58 </body>
59 </html>