]> source.dussan.org Git - jquery.git/commitdiff
Added .hasClass() (Simply just passes through to .is()).
authorJohn Resig <jeresig@gmail.com>
Sat, 8 Sep 2007 13:49:42 +0000 (13:49 +0000)
committerJohn Resig <jeresig@gmail.com>
Sat, 8 Sep 2007 13:49:42 +0000 (13:49 +0000)
src/core.js

index 537b4e2bec7a6b250e435ad4cf97ac827d45c3a6..ab6b6199300de1107c560476337c6de0cc605302 100644 (file)
@@ -304,6 +304,10 @@ jQuery.fn = jQuery.prototype = {
        is: function(expr) {
                return expr ? jQuery.multiFilter(expr,this).length > 0 : false;
        },
+
+       hasClass: function(expr) {
+               return this.is("." + expr);
+       },
        
        val: function( val ) {
                if ( val == undefined ) {