Adds jQuery collection to objects that will be used as global events context if provi...
[jquery.git] / test / localfile.html
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en" dir="ltr" id="html">
3 <head>
4         <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
5         <title>jQuery Local File Test</title>
6         <!-- Includes -->
7         <script src="../src/core.js"></script>
8         <script src="../src/support.js"></script>
9         <script src="../src/data.js"></script>
10         <script src="../src/queue.js"></script>
11         <script src="../src/attributes.js"></script>
12         <script src="../src/event.js"></script>
13         <script src="../src/sizzle/sizzle.js"></script>
14         <script src="../src/sizzle-jquery.js"></script>
15         <script src="../src/traversing.js"></script>
16         <script src="../src/manipulation.js"></script>
17         <script src="../src/css.js"></script>
18         <script src="../src/ajax.js"></script>
19         <script src="../src/ajax/jsonp.js"></script>
20         <script src="../src/ajax/script.js"></script>
21         <script src="../src/ajax/xhr.js"></script>
22         <script src="../src/effects.js"></script>
23         <script src="../src/offset.js"></script>
24         <script src="../src/dimensions.js"></script>
25 </head>
26
27 <body>
28         <h1>jQuery Local File Test</h1>
29         <ul>
30                 <li>
31                         Access this file using the "file:" protocol.
32                 </li>
33                 <li>
34                         Two lines must appear below.
35                 </li>
36                 <li>
37                         Opera will fail at detecting errors, it's a known issue.
38                 </li>
39         </ul>
40         <script>
41                 jQuery.ajax( "data/badjson.js" , {
42                         dataType: "text"
43                 }).success(function() {
44                         jQuery( "<div/>" ).text( "Success OK" ).appendTo( "body" );
45                 });
46                 jQuery.ajax( "data/doesnotexist.ext" , {
47                         dataType: "text"
48                 }).error(function() {
49                         jQuery( "<div/>" ).text( "Error OK" ).appendTo( "body" );
50                 }).success(function() {
51                         if ( jQuery.browser.opera ) {
52                                 jQuery( "<div/>" ).text( "Error Fail (Opera)" ).appendTo( "body" );
53                         }
54                 });
55         </script>
56 </body>