X-Git-Url: http://git.asbjorn.it/?a=blobdiff_plain;f=src%2Fajax%2Fajax.js;h=2c63605d72bf10f5be47720ef9941ea6439e3023;hb=e218628dda347f5aa9241046780f3345713d7a35;hp=4cc2962cbc5faa5cbb9228112be33eec4c16bc3a;hpb=785de349f5d31d8ecb75c6842b3b9d63e90a433d;p=jquery.git diff --git a/src/ajax/ajax.js b/src/ajax/ajax.js index 4cc2962..2c63605 100644 --- a/src/ajax/ajax.js +++ b/src/ajax/ajax.js @@ -39,6 +39,13 @@ jQuery.fn.extend({ * start(); * }); * + * @test stop(); // check if load can be called with only url + * $('#first').load("data/name.php"); + * setTimeout(function() { + * ok( $('#first').text() == 'ERROR', 'Check if load works without callback'); + * start(); + * }, 100); + * * @name load * @type jQuery * @param String url The URL of the HTML file to load. @@ -281,19 +288,6 @@ jQuery.extend({ * } * ) * - * @test stop(); - * $.get("data/dashboard.xml", function(xml) { - * var content = []; - * $('tab', xml).each(function(k) { - * // workaround for IE needed here, $(this).text() throws an error - * // content[k] = $.trim(this.firstChild.data) || $(this).text(); - * content[k] = $(this).text(); - * }); - * ok( content[0] && content[0].match(/blabla/), 'Check first tab' ); - * ok( content[1] && content[1].match(/blublu/), 'Check second tab' ); - * start(); - * }); - * * @name $.get * @type jQuery * @param String url The URL of the page to load. @@ -518,6 +512,8 @@ jQuery.extend({ * start(); * } * }); + * // reset timeout + * $.ajaxTimeout(0); * * * @name $.ajaxTimeout