Skip to content

gmcnaughton/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)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 90.9%
  • CSS 7.6%
  • HTML 1.5%