Created
June 8, 2010 13:28
-
-
Save felipeelias/430000 to your computer and use it in GitHub Desktop.
replaceClass plugin for jQuery
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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