Skip to content

Instantly share code, notes, and snippets.

@sjwilliams
Created November 19, 2012 23:47
Show Gist options
  • 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