- });
- }
-});
-
-jQuery.each({
- removeAttr: function( name ) {
- jQuery.attr( this, name, "" );
- if (this.nodeType == 1)
- this.removeAttribute( name );
- },
-
- addClass: function( classNames ) {
- jQuery.className.add( this, classNames );
- },
-
- removeClass: function( classNames ) {
- jQuery.className.remove( this, classNames );
- },
-
- toggleClass: function( classNames, state ) {
- var type = typeof classNames;
- if ( type === "string" ) {
- // toggle individual class names
- var isBool = typeof state === "boolean", className, i = 0,
- classNames = classNames.split( /\s+/ );
- while ( (className = classNames[ i++ ]) ) {
- // check each className given, space seperated list
- state = isBool ? state : !jQuery.className.has( this, className );
- jQuery.className[ state ? "add" : "remove" ]( this, className );
- }
- } else if ( type === "undefined" || type === "boolean" ) {
- if ( this.className ) {
- // store className if set
- jQuery.data( this, "__className__", this.className );