diff options
author | John Resig <jeresig@gmail.com> | 2007-09-08 13:49:42 +0000 |
---|---|---|
committer | John Resig <jeresig@gmail.com> | 2007-09-08 13:49:42 +0000 |
commit | d2f82aba26e49e957af493b4ed81c025ac5c194b (patch) | |
tree | e54f9b4d5989edfaf0a8bb6601081da192641d56 | |
parent | 6728e3cf74d02794113deb0af70a5f9a7caa2241 (diff) | |
download | jquery-d2f82aba26e49e957af493b4ed81c025ac5c194b.tar.gz jquery-d2f82aba26e49e957af493b4ed81c025ac5c194b.zip |
Added .hasClass() (Simply just passes through to .is()).
-rw-r--r-- | src/core.js | 4 |
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 ) { |