saas786 / jquery-regexp-classes

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

Home Page:http://plugins.jquery.com/project/removeClass

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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)

http://plugins.jquery.com/project/removeClass