aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohn Resig <jeresig@gmail.com>2007-09-08 13:49:42 +0000
committerJohn Resig <jeresig@gmail.com>2007-09-08 13:49:42 +0000
commitd2f82aba26e49e957af493b4ed81c025ac5c194b (patch)
treee54f9b4d5989edfaf0a8bb6601081da192641d56
parent6728e3cf74d02794113deb0af70a5f9a7caa2241 (diff)
downloadjquery-d2f82aba26e49e957af493b4ed81c025ac5c194b.tar.gz
jquery-d2f82aba26e49e957af493b4ed81c025ac5c194b.zip
Added .hasClass() (Simply just passes through to .is()).
-rw-r--r--src/core.js4
1 files changed, 4 insertions, 0 deletions
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 ) {