Skip to content

Instantly share code, notes, and snippets.

@thejefflarson
Created June 1, 2010 22:42
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 thejefflarson/421638 to your computer and use it in GitHub Desktop.
Save thejefflarson/421638 to your computer and use it in GitHub Desktop.
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