Created
June 29, 2011 10:19
-
-
Save aaronmcadam/1053597 to your computer and use it in GitHub Desktop.
remove a class based on a pattern
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
| $(slider).parent().find('.rating').removeClass(function(index, elementClass) { | |
| matches = elementClass.match(/rating-[0-9]+/); | |
| if( $(matches).length ) { | |
| return matches.join(' '); | |
| } | |
| }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment