jQuery.fn.swapClass = function(c1, c2){
return this.each(function(){
var t = $(this);
( t.is('.'+c1)) ?
t.addClass(c2).removeClass(c1) : t.addClass(c1).removeClass(c2);
});
}
I've found this to be pretty helpful, so i thought i would contribute it to the group.
Also i would like to know if this is the most efficient this code could be.
Thanks,
Wil
_______________________________________________ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/