Created
May 15, 2014 17:12
-
-
Save imcmahon/4335d05967f54bb6d14e to your computer and use it in GitHub Desktop.
jQuery remove all classes with the same prefix
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
$('html').removeClass(function (index, css) { | |
return (css.match (/\bpage-\S+/g) || []).join(' '); // removes anything that starts with "page-" | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment