Neverending Pile of Messages

    jquery-remove-class-by-mask

    1.0.1 • Public • Published

    jQuery.removeClassByMask

    jQuery plugin for remove class by mask

    Requirements

    1. jQuery v2+

    Install

    npm i jquery-remove-class-by-mask

    Connect

    <script src="https://code.jquery.com/jquery-2.2.4.min.js" integrity="sha256-BbhdlvQf/xTY9gja0Dq3HiwQF8LaCRTXxZKRutelT44=" crossorigin="anonymous"></script>
    <script src="dist/jquery.remove-class-by-mask.min.js" type="text/javascript"></script>

    removeClassByMask(mask)

    • mask (string) required - Mask with * symbols, symbol * changes to \S+ regular expression

    Usage

    var elem = $('#elem');
     
    // bg-success bg-danger text-white text-center
    elem.addClass('bg-success bg-danger text-white text-center');
     
    // text-white text-center
    elem.removeClassByMask('bg-*');
     
    // text-center
    elem.removeClassByMask('*-white');

    Install

    npm i jquery-remove-class-by-mask

    DownloadsWeekly Downloads

    1

    Version

    1.0.1

    License

    MIT

    Unpacked Size

    4.21 kB

    Total Files

    8

    Last publish

    Collaborators

    • dimns