@@ 2228-2259 (lines=32) @@ | ||
2225 | return this; |
|
2226 | }, |
|
2227 | ||
2228 | removeClass: function( value ) { |
|
2229 | var classNames, i, l, elem, className, c, cl; |
|
2230 | ||
2231 | if ( jQuery.isFunction( value ) ) { |
|
2232 | return this.each(function( j ) { |
|
2233 | jQuery( this ).removeClass( value.call(this, j, this.className) ); |
|
2234 | }); |
|
2235 | } |
|
2236 | ||
2237 | if ( (value && typeof value === "string") || value === undefined ) { |
|
2238 | classNames = ( value || "" ).split( rspace ); |
|
2239 | ||
2240 | for ( i = 0, l = this.length; i < l; i++ ) { |
|
2241 | elem = this[ i ]; |
|
2242 | ||
2243 | if ( elem.nodeType === 1 && elem.className ) { |
|
2244 | if ( value ) { |
|
2245 | className = (" " + elem.className + " ").replace( rclass, " " ); |
|
2246 | for ( c = 0, cl = classNames.length; c < cl; c++ ) { |
|
2247 | className = className.replace(" " + classNames[ c ] + " ", " "); |
|
2248 | } |
|
2249 | elem.className = jQuery.trim( className ); |
|
2250 | ||
2251 | } else { |
|
2252 | elem.className = ""; |
|
2253 | } |
|
2254 | } |
|
2255 | } |
|
2256 | } |
|
2257 | ||
2258 | return this; |
|
2259 | }, |
|
2260 | ||
2261 | toggleClass: function( value, stateVal ) { |
|
2262 | var type = typeof value, |
@@ 1765-1795 (lines=31) @@ | ||
1762 | return this; |
|
1763 | }, |
|
1764 | ||
1765 | removeClass: function( value ) { |
|
1766 | if ( jQuery.isFunction(value) ) { |
|
1767 | return this.each(function(i) { |
|
1768 | var self = jQuery(this); |
|
1769 | self.removeClass( value.call(this, i, self.attr("class")) ); |
|
1770 | }); |
|
1771 | } |
|
1772 | ||
1773 | if ( (value && typeof value === "string") || value === undefined ) { |
|
1774 | var classNames = (value || "").split( rspaces ); |
|
1775 | ||
1776 | for ( var i = 0, l = this.length; i < l; i++ ) { |
|
1777 | var elem = this[i]; |
|
1778 | ||
1779 | if ( elem.nodeType === 1 && elem.className ) { |
|
1780 | if ( value ) { |
|
1781 | var className = (" " + elem.className + " ").replace(rclass, " "); |
|
1782 | for ( var c = 0, cl = classNames.length; c < cl; c++ ) { |
|
1783 | className = className.replace(" " + classNames[c] + " ", " "); |
|
1784 | } |
|
1785 | elem.className = jQuery.trim( className ); |
|
1786 | ||
1787 | } else { |
|
1788 | elem.className = ""; |
|
1789 | } |
|
1790 | } |
|
1791 | } |
|
1792 | } |
|
1793 | ||
1794 | return this; |
|
1795 | }, |
|
1796 | ||
1797 | toggleClass: function( value, stateVal ) { |
|
1798 | var type = typeof value, |