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 537b4e2..ab6b619 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 ) {