X-Git-Url: http://git.asbjorn.biz/?a=blobdiff_plain;ds=sidebyside;f=src%2Fjquery%2Fjquery.js;h=910c11b21a28c64aae2459b71e3805d9d8111afc;hb=9c7f8ba90ea45a653cf45a6379ccd4943cc22200;hp=a8872dfb8e17236f951e6f318809a246beb92f47;hpb=ec2b688920cf38f5bb2487b8a1897f7eb7557248;p=jquery.git diff --git a/src/jquery/jquery.js b/src/jquery/jquery.js index a8872df..910c11b 100644 --- a/src/jquery/jquery.js +++ b/src/jquery/jquery.js @@ -1345,10 +1345,7 @@ jQuery.extend({ // internal only, use is(".class") has: function( t, c ) { - t = t.className || t; - // escape regex characters - c = c.replace(/([\.\\\+\*\?\[\^\]\$\(\)\{\}\=\!\<\>\|\:])/g, "\\$1"); - return t && new RegExp("(^|\\s)" + c + "(\\s|$)").test( t ); + return jQuery.inArray( c, (t.className || t).toString().split(/\s+/) ) > -1; } },