X-Git-Url: http://git.asbjorn.biz/?a=blobdiff_plain;f=src%2Fajax%2Fajax.js;h=bcf9472d8b81af572a1a8507f1200db9c30f908b;hb=2e544e9eb89c87b9eac6df445474d21e9be604eb;hp=5aeb9439a551b704617e82bd7f754b23c586958a;hpb=7b2c84ddbe004ed4ab2ee3982af40b7275d7dfde;p=jquery.git diff --git a/src/ajax/ajax.js b/src/ajax/ajax.js index 5aeb943..bcf9472 100644 --- a/src/ajax/ajax.js +++ b/src/ajax/ajax.js @@ -41,10 +41,10 @@ jQuery.fn.extend({ * * @test stop(); // check if load can be called with only url * $('#first').load("data/name.php"); - * setTimeout(function() { + * $.get("data/name.php", function() { * ok( $('#first').text() == 'ERROR', 'Check if load works without callback'); * start(); - * }, 100); + * }); * * @name load * @type jQuery @@ -288,6 +288,18 @@ jQuery.extend({ * } * ) * + * @test stop(); + * $.get('data/dashboard.xml', function(xml) { + * var content = []; + * $('tab', xml).each(function() { + * content.push($(this).text()); + * }); + * ok( content[0] == 'blabla', 'Check first tab'); + * ok( content[1] == 'blublu', 'Check second tab'); + * start(); + * }); + * + * * @name $.get * @type jQuery * @param String url The URL of the page to load.