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

@ -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 ) {