Added 2 of 3 fixes of #164
[jquery.git] / src / ajax / ajax.js
index 5aeb943..bcf9472 100644 (file)
@@ -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.