Created
September 4, 2014 12:37
-
-
Save KATT/9643b4e0597e6dc6fc11 to your computer and use it in GitHub Desktop.
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
$.fn.removeClassStartingWith = function(str) { | |
return this.removeClass(function(i, classNames) { | |
return $.grep(classNames.split(' '), function(className) { | |
return className.indexOf(str) === 0; | |
}).join(' '); | |
}); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment