]> source.dussan.org Git - jquery.git/commitdiff
Optimize :input with better regex
authorJörn Zaefferer <joern.zaefferer@gmail.com>
Mon, 20 Nov 2006 21:01:17 +0000 (21:01 +0000)
committerJörn Zaefferer <joern.zaefferer@gmail.com>
Mon, 20 Nov 2006 21:01:17 +0000 (21:01 +0000)
src/jquery/jquery.js

index f2e9c1816e1c32e9467534ef9cf74589e257f30e..7b891ea34f82b86d3dacb3beeb0f48c0dbf5e7e9 100644 (file)
@@ -1401,7 +1401,7 @@ jQuery.extend({
                        image: "a.type=='image'",
                        reset: "a.type=='reset'",
                        button: "a.type=='button'",
-                       input: "a.nodeName.toLowerCase().match(/input|select|textarea|button/)"
+                       input: "/input|select|textarea|button/i.test(a.nodeName)"
                },
                ".": "jQuery.className.has(a,m[2])",
                "@": {