Skip to content

Instantly share code, notes, and snippets.

@mauryaratan mauryaratan/diff.js
Created Nov 14, 2013

Embed
What would you like to do?
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
You can’t perform that action at this time.