Skip to content

Instantly share code, notes, and snippets.

@sjwilliams
Created November 19, 2012 23:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sjwilliams/4114955 to your computer and use it in GitHub Desktop.
Save sjwilliams/4114955 to your computer and use it in GitHub Desktop.
jQuery, remove classes by regex match
this.$portfolioItems.removeClass(function(index, cssClass){
return (cssClass.match (/(?:(?:row|col)-[\d]|last-row|first-row)/) || []).join(' ');
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment