Skip to content

Instantly share code, notes, and snippets.

@cdl
Created August 29, 2013 19:06
Show Gist options
  • Save cdl/6382121 to your computer and use it in GitHub Desktop.
Save cdl/6382121 to your computer and use it in GitHub Desktop.
// Here's what I'm trying to achieve:
//
// - if an element has the class "small-rm", remove any classes that begin with "small-" from it
// - if an element has the class "pull-rm", remove any classes that begin with "pull-" from it
//
$(".small-rm").removeClass("[class^='small-']");
$(".pull-rm").removeClass("[class^='pull-']");
// Should this not work?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment