Added .hasClass() (Simply just passes through to .is()).

This commit is contained in:
John Resig 2007-09-08 13:49:42 +00:00
parent 6728e3cf74
commit d2f82aba26

View File

@ -305,6 +305,10 @@ jQuery.fn = jQuery.prototype = {
return expr ? jQuery.multiFilter(expr,this).length > 0 : false; return expr ? jQuery.multiFilter(expr,this).length > 0 : false;
}, },
hasClass: function(expr) {
return this.is("." + expr);
},
val: function( val ) { val: function( val ) {
if ( val == undefined ) { if ( val == undefined ) {
if ( this.length ) { if ( this.length ) {