Skip to content

Instantly share code, notes, and snippets.

@felipeelias
Created June 8, 2010 13:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save felipeelias/430000 to your computer and use it in GitHub Desktop.
Save felipeelias/430000 to your computer and use it in GitHub Desktop.
replaceClass plugin for jQuery
jQuery.fn.extend({
replaceClass: function(original, replace) {
return this.each(function() {
jQuery(this).removeClass(original);
jQuery(this).addClass(replace);
});
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment