X-Git-Url: http://git.asbjorn.biz/?a=blobdiff_plain;f=src%2Fselector%2Fselector.js;h=bd8c7912d9ab0f8cb0d6a1791e81189173fe5caa;hb=f2f399dcd552e73f68c9e8adfe26ef7995724cb3;hp=f2c224a027362c3355659bf3290001a206df3648;hpb=b6d920cf05fae3dcfe515166013ce39411ac5e16;p=jquery.git diff --git a/src/selector/selector.js b/src/selector/selector.js index f2c224a..bd8c791 100644 --- a/src/selector/selector.js +++ b/src/selector/selector.js @@ -53,7 +53,10 @@ jQuery.extend({ image: "'image'==a.type", reset: "'reset'==a.type", button: '"button"==a.type||jQuery.nodeName(a,"button")', - input: "/input|select|textarea|button/i.test(a.nodeName)" + input: "/input|select|textarea|button/i.test(a.nodeName)", + + // :has() + has: "jQuery.find(m[3],a).length" }, "[": "jQuery.find(m[2],a).length" }, @@ -402,7 +405,7 @@ jQuery.extend({ f = jQuery.expr[m[1]][m[2]]; // Build a custom macro to enclose it - eval("f = function(a,i){return " + f + "}"); + f = eval("false||function(a,i){return " + f + "}"); // Execute it against the current filter r = jQuery.grep( r, f, not );