/[projects]/misc/horsensspejder-web/jquery/jquery-ui-1.10.3/tests/visual/dialog/performance.html
ViewVC logotype

Contents of /misc/horsensspejder-web/jquery/jquery-ui-1.10.3/tests/visual/dialog/performance.html

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2125 - (show annotations) (download) (as text)
Wed Mar 12 19:30:05 2014 UTC (10 years, 3 months ago) by torben
File MIME type: text/html
File size: 2412 byte(s)
initial import
1 <!doctype html>
2 <html lang="en">
3 <head>
4 <meta charset="utf-8">
5 <title>Dialog Visual Test - Modal Dialog in Large DOM</title>
6 <link rel="stylesheet" href="../../../themes/base/jquery.ui.all.css">
7 <script src="../../../jquery-1.9.1.js"></script>
8 <script src="../../../ui/jquery.ui.core.js"></script>
9 <script src="../../../ui/jquery.ui.position.js"></script>
10 <script src="../../../ui/jquery.ui.widget.js"></script>
11 <script src="../../../ui/jquery.ui.mouse.js"></script>
12 <script src="../../../ui/jquery.ui.draggable.js"></script>
13 <script src="../../../ui/jquery.ui.resizable.js"></script>
14 <script src="../../../ui/jquery.ui.button.js"></script>
15 <script src="../../../ui/jquery.ui.dialog.js"></script>
16 <script>
17 $(function() {
18 var start,
19 html = new Array( 500 ).join( $.trim( $( "#template" ).html() ) );
20 $( html ).appendTo( "body" );
21
22 start = $.now();
23 $( "#dialog" ).dialog({
24 modal: true,
25 autoOpen: false
26 });
27 $( "<li>Create: " + ($.now() - start) + "ms</li>" ).appendTo( "#log" );
28
29 $( "#opener" ).click(function() {
30 start = $.now();
31 $( "#dialog" ).dialog( "open" );
32 $( "<li>Open: " + ($.now() - start) + "ms</li>" ).appendTo( "#log" );
33 });
34 });
35 </script>
36 </head>
37 <body>
38
39 <p>WHAT: A single dialog is created on a page with a large DOM.</p>
40 <p>EXPECTED: Creating and opening the dialog should be fast, regardless of page size.</p>
41
42 <button id="opener">open dialog</button>
43 <div id="dialog" title="Dialog Title">
44 <p> Dialog Content </p>
45 <input type="text">
46 </div>
47
48 <ul id="log"></ul>
49
50 <script type="text/html" id="template">
51 <div><div><div><div><div><div><div><div><div><div>
52 <div><div><div><div><div><div><div><div><div><div>
53 <div><div><div><div><div><div><div><div><div><div>
54 <div><div><div><div><div><div><div><div><div><div>
55 <div><div><div><div><div><div><div><div><div><div>
56 <div><p>This <span>is</span> <span>a</span> <strong>large</strong> <abbr>DOM</abbr>.</p></div>
57 <input>
58 <select>
59 <option>option 1</option>
60 <option>option 2</option>
61 <option>option 3</option>
62 <option>option 4</option>
63 <option>option 5</option>
64 </select>
65 </div></div></div></div></div></div></div></div></div></div>
66 </div></div></div></div></div></div></div></div></div></div>
67 </div></div></div></div></div></div></div></div></div></div>
68 </div></div></div></div></div></div></div></div></div></div>
69 </div></div></div></div></div></div></div></div></div></div>
70 </script>
71
72 </body>
73 </html>

  ViewVC Help
Powered by ViewVC 1.1.20