> When writing plugins you're fully encouraged to use the
> @private methods - that's what they're there for. I'm
> working to document them better for plugin authors, but
> you should definitely feel free to use the @private methods.
Ah okay, so @private is more like protected. Good to know so I won't feel
guilty about using them. :)
> In reality, however, what you're trying to achieve is simply
> the toggling of two classes - reducing your total function to:
>
> jQuery.fn.swapClass = function( c1, c2 ) {
> return this.toggleClass( c1 ).toggleClass( c2 );
> };
>
> Which (should) have duplicate results.
Only if the selected elements have either c1 or c2 initially. If they have
neither or both, it won't yield the same results.
_______________________________________________
jQuery mailing list
[email protected]
http://jquery.com/discuss/