Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
dispatch : function(e){
e.preventDefault();
var clickedOn = $(e.target);
clickedOn.parents(this.scope).find(this.tag).removeClass('active');
clickedOn.addClass('active');
this.el.filter('.active').each(function(){
var disp = JSON.parse($(this).attr('data-dispatch'));
var key = _.keys(disp)[0];
$('div#filterable').trigger(key, [disp, key]);
});
}
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.