|
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" |
|
2 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
|
3 |
|
4 <html xmlns="http://www.w3.org/1999/xhtml"> |
|
5 <head> |
|
6 <meta name="generator" |
|
7 content="HTML Tidy, see www.w3.org" /> |
|
8 |
|
9 <title>Tester</title> |
|
10 <style type="text/css"> |
|
11 #container { background:yellow; width:400px; height:400px; } |
|
12 |
|
13 </style> |
|
14 <script type="text/javascript" src="../dist/jquery.js"> |
|
15 </script> |
|
16 <script type="text/javascript"> |
|
17 function doIt() { |
|
18 $("#adiv").text("click!"); |
|
19 $("#adiv").trigger("acustom.atype"); |
|
20 } |
|
21 |
|
22 function showMouse(e) { |
|
23 $("#adiv").text("( " + e.pageX + ", " + e.pageY + " )"); |
|
24 } |
|
25 |
|
26 $(function () { |
|
27 $("#doit").bind('click.mine', doIt); |
|
28 $("#container").mousemove(showMouse); |
|
29 $("#adiv").bind("acustom.atype", function () { |
|
30 //console.log("custom"); |
|
31 }); |
|
32 }); |
|
33 |
|
34 </script> |
|
35 </head> |
|
36 |
|
37 <body> |
|
38 <button id="doit">Do It</button> |
|
39 |
|
40 <div id="container"> |
|
41 Hi |
|
42 </div> |
|
43 |
|
44 <div id="adiv"> |
|
45 </div> |
|
46 </body> |
|
47 </html> |
|
48 |