Added support for [@foo] against DOM object properties (not just attributes).
[jquery.git] / src / selector / selector.js
index 4633c30..a478376 100644 (file)
@@ -59,7 +59,7 @@ jQuery.extend({
                        _resort: function(m){
                                return ["", m[1], m[3], m[2], m[5]];
                        },
-                       _prefix: "z=jQuery.attr(a,m[3]);"
+                       _prefix: "z=a[m[3]]||jQuery.attr(a,m[3]);"
                },
                "[": "jQuery.find(m[2],a).length"
        },
@@ -101,7 +101,7 @@ jQuery.extend({
                        return [ t ];
 
                // Make sure that the context is a DOM Element
-               if ( context && context.nodeType == undefined )
+               if ( context && !context.nodeType )
                        context = null;
 
                // Set the correct context (if none is provided)
@@ -423,4 +423,4 @@ jQuery.extend({
 
                return r;
        }
-});
\ No newline at end of file
+});