Return to Snippet

Revision: 8705
at October 3, 2008 14:54 by johnloy


Initial Code
jQuery.delegate = function(rules) {
  return function(e) {
    var target = $(e.target);
    for (var selector in rules)
      if (target.is(selector)) return rules[selector].apply(this, $.makeArray(arguments));
  }
}

Initial URL

                                

Initial Description

                                

Initial Title
JQuery function to handle event delegation

Initial Tags
javascript, textmate, jquery

Initial Language
Other