Skip to content

Instantly share code, notes, and snippets.

View mpouncy-netpulse's full-sized avatar

Mike Pouncy mpouncy-netpulse

View GitHub Profile
@mpouncy-netpulse
mpouncy-netpulse / jquery.alterclass.js
Last active January 11, 2018 19:00 — forked from peteboere/jquery.alterclass.js
jQuery alterClass plugin: Remove element classes with wildcard matching. Optionally add classes.
/**
* jQuery alterClass plugin
*
* Remove element classes with wildcard matching. Optionally add classes:
* $( '#foo' ).alterClass( 'foo-* bar-*', 'foobar' )
*
* Copyright (c) 2011 Pete Boere (the-echoplex.net)
* Updated 2013 by Mike Pouncy (scrupl.es) - Condensed code, removed unneeded vars.
* Free under terms of the MIT license: http://www.opensource.org/licenses/mit-license.php
*