Proposal on Attributes - replaceClass
replaceClass would be like:
replaceClass ( oldClass, newClass )
Returns: jQuery
Replaces the first class with the second class.
My code for this is:
jQuery.fn.extend({
'replaceClass': function(remC,addC){
return this.each(function() { $
(this).removeClass(remC).addClass(addC); });
}
});
I would hope this gets implemented by default in jQuery.
Cheers.