Last active
March 2, 2016 01:52
-
-
Save dedosmedia/40c212f5f64b51cd6d9c to your computer and use it in GitHub Desktop.
JS: RemoveClass con un prefijo
This file contains 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
$el.removeClass(function(index,classes){ | |
var matches = classes.match(/drop-\d+/); // some-class-somenumber | |
return (matches) ? matches.join(' ') : ''; | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment