Skip to content

Commit

Permalink
Added .hasClass() (Simply just passes through to .is()).
Browse files Browse the repository at this point in the history
  • Loading branch information
jeresig committed Sep 8, 2007
1 parent 6728e3c commit d2f82ab
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/core.js
Expand Up @@ -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 ) {
Expand Down

0 comments on commit d2f82ab

Please sign in to comment.