Another $ bites the dust. Should be all of them now.
[jquery.git] / src / ajax / ajax.js
index 1b1e274..a52879a 100644 (file)
@@ -661,6 +661,16 @@ jQuery.extend({
         *   }
         * });
         *
+        * @test stop();
+        * $.ajax({
+        *   url: "data/with_fries.xml", dataType: "xml", type: "GET", data: "", success: function(resp) {
+        *     ok( $("properties", resp).length == 1, 'properties in responseXML' );
+        *     ok( $("jsconf", resp).length == 1, 'jsconf in responseXML' );
+        *     ok( $("thing", resp).length == 2, 'things in responseXML' );
+        *     start();
+        *   }
+        * });
+        *
         * @name $.ajax
         * @type jQuery
         * @param Hash prop A set of properties to initialize the request with.
@@ -678,7 +688,7 @@ jQuery.extend({
                        var dataType = type.dataType;
                        var global = typeof type.global == "boolean" ? type.global : true;
                        var timeout = typeof type.timeout == "number" ? type.timeout : jQuery.timeout;
-                       var ifModified = type.ifModified || false;
+                       ifModified = type.ifModified || false;
                        data = type.data;
                        url = type.url;
                        type = type.type;
@@ -833,7 +843,7 @@ jQuery.extend({
                if ( type == "json" ) eval( "data = " + data );
                
                // evaluate scripts within html
-               if ( type == "html" ) $("<div>").html(data).evalScripts();
+               if ( type == "html" ) jQuery("<div>").html(data).evalScripts();
 
                return data;
        },