Only if the selected elements have either c1 or c2 initially. If they have
neither or both, it won't yield the same results.
Right this was my intention. I changed the plugin a bit to make it more readable, IMO. What it does is looks for c1 if it's not present it adds it. Then next time swapClass is run it finds c1 so it is removed and c2 is added.
You can see that here:
http://sandbox.wilstuckey.com/jquery/swapClass.html
-Wil
_______________________________________________ jQuery mailing list [email protected] http://jquery.com/discuss/
