Skip to content

NV/jquery-regexp-classes

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

$(elem).removeClass(regExp) and $(elem).hasClass(regExp)

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published