Skip to content

Instantly share code, notes, and snippets.

@mauryaratan
Created November 14, 2013 12:53
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 mauryaratan/7466282 to your computer and use it in GitHub Desktop.
Save mauryaratan/7466282 to your computer and use it in GitHub Desktop.
Filter out the unnecessary tag filters. Used in http://demo.codestag.com/forest/
var all_filters = $('#all-skills').data('all-filters'),
all_skills = $('#all-skills').data('all-skills');
all_filters.filter(function(i,v){
if( all_skills.indexOf(i) === -1 ) {
var diff = all_filters[v];
$('.portfolio-filter').find("[data-filter='"+ diff +"']").addClass('invalid');
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment