From d2f82aba26e49e957af493b4ed81c025ac5c194b Mon Sep 17 00:00:00 2001 From: John Resig Date: Sat, 8 Sep 2007 13:49:42 +0000 Subject: [PATCH] Added .hasClass() (Simply just passes through to .is()). --- src/core.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/core.js b/src/core.js index 537b4e2be..ab6b61993 100644 --- a/src/core.js +++ b/src/core.js @@ -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 ) { -- 2.39.5