4 Test for jQuery.holdReady. Needs to be a
5 standalone test since it deals with DOM
13 div { margin-top:
10px; }
14 #output { background-color: green }
15 #expectedOutput { background-color: green }
17 <script src=
"jquery.js"></script>
19 <!-- Load the script loader that uses
21 <script src=
"data/readywaitloader.js"></script>
23 <script type=
"text/javascript">
25 // The delayedMessage is defined by
26 // the readywaitasset.js file, so the
27 // next line will only work if this DOM
28 // ready callback is called after readyWait
29 // has been decremented by readywaitloader.js
30 // If an error occurs.
31 jQuery("#output").append(delayedMessage
);
40 This is a test page for jQuery.readyWait and jQuery.holdReady,
42 <a href=
"http://bugs.jquery.com/ticket/6781">#
6781</a>
44 <a href=
"http://bugs.jquery.com/ticket/8803">#
8803</a>.
47 Test for jQuery.holdReady, which can be used
48 by plugins and other scripts to indicate something
49 important to the page is still loading and needs
50 to block the DOM ready callbacks that are registered
54 Script loaders are the most likely kind of script
55 to use jQuery.holdReady, but it could be used by
56 other things like a script that loads a CSS file
57 and wants to pause the DOM ready callbacks.
60 <strong>Expected Result
</strong>: The text
61 <span id=
"expectedOutput">It Worked!
</span>
62 appears below after about
<strong>2 seconds.
</strong>
65 If there is an error in the console,
66 or the text does not show up, then the test failed.
68 <div id=
"output"></div>