Skip to content
$(elem).removeClass(regExp) and $(elem).hasClass(regExp) http://plugins.jquery.com/project/removeClass
JavaScript
Find file
Latest commit 257332b @NV Merge pull request #1 from kpowell/gh-pages
fix removeClass breaking the chain
Failed to load latest commit information.
test Share and Enjoy!
README.mdown Tests link added.
jquery.hasClass.js Share and Enjoy!
jquery.removeClass.js Converted spaces to tabs

README.mdown

jQuery’s hasClass and removeClass on steroids

$("<div class='state-loading icon-32'/>").hasClass(/-loading$/)
// true

$("<div class='icon-32 icon-loading disabled'/>").removeClass(/^icon-/)
// <div class='disabled'/>

Tests

Origins

License: MIT.

Something went wrong with that request. Please try again.