| 1 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" |
|---|
| 2 | "http://www.w3.org/TR/html4/loose.dtd"> |
|---|
| 3 | <html lang="en"> |
|---|
| 4 | <head> |
|---|
| 5 | <script type="text/javascript" src="jquery-1.2.6.js"></script> |
|---|
| 6 | <script type="text/javascript" src="jquery.create.js"></script> |
|---|
| 7 | |
|---|
| 8 | <script type="text/javascript"> |
|---|
| 9 | var JQTester = { |
|---|
| 10 | init: function(){ |
|---|
| 11 | jQuery.noConflict(); |
|---|
| 12 | jQuery('#events').bind('click', function(e){ |
|---|
| 13 | jQuery('#events').html(jQuery('#events').html() + 'click<br>'); |
|---|
| 14 | }); |
|---|
| 15 | jQuery('#events').bind('submit', function(e){ |
|---|
| 16 | jQuery('#events').html(jQuery('#events').html() + 'submit<br>'); |
|---|
| 17 | }); |
|---|
| 18 | jQuery('#events').bind('ajaxComplete', function(e){ |
|---|
| 19 | jQuery('#events').html(jQuery('#events').html() + 'ajaxComplete<br>'); |
|---|
| 20 | }); |
|---|
| 21 | jQuery('#events').bind('ajaxStart', function(e){ |
|---|
| 22 | jQuery('#events').html(jQuery('#events').html() + 'ajaxStart<br>'); |
|---|
| 23 | }); |
|---|
| 24 | jQuery('#events').bind('ajaxSuccess', function(e){ |
|---|
| 25 | jQuery('#events').html(jQuery('#events').html() + 'ajaxSuccess<br>'); |
|---|
| 26 | }); |
|---|
| 27 | jQuery('#button').click(function(){ |
|---|
| 28 | JQTester.doit(); |
|---|
| 29 | return true; |
|---|
| 30 | }); |
|---|
| 31 | }, |
|---|
| 32 | |
|---|
| 33 | doit: function(){ |
|---|
| 34 | jQuery.getJSON('http://td-www.loan.com/jsonreturn.html?jsoncallback=?'); |
|---|
| 35 | } |
|---|
| 36 | } |
|---|
| 37 | function callbackfnc(data){ |
|---|
| 38 | console.log(data); |
|---|
| 39 | } |
|---|
| 40 | $(document).ready(function(){ |
|---|
| 41 | JQTester.init(); |
|---|
| 42 | }); |
|---|
| 43 | </script> |
|---|
| 44 | |
|---|
| 45 | </head> |
|---|
| 46 | <body> |
|---|
| 47 | |
|---|
| 48 | <div id="loading" style="display:none">BOX BOX BOX</div> |
|---|
| 49 | <div id="events"></div> |
|---|
| 50 | <input id="button" type="button"> |
|---|
| 51 | </body> |
|---|
| 52 | </html> |
|---|