Skip to content

Instantly share code, notes, and snippets.

@jtrim
Created January 16, 2012 23:58
Show Gist options
  • Select an option

  • Save jtrim/1623712 to your computer and use it in GitHub Desktop.

Select an option

Save jtrim/1623712 to your computer and use it in GitHub Desktop.
validClickElementCallbacks: [
(el) -> $(el)[0].tagName.match(/li/i) && $(el)[0].className.match(/day/),
(el) -> $(el)[0].tagName.match(/span/i) && $(el)[0].className.match(/remaining/),
(el) -> $(el)[0].tagName.match(/h3/i)
]
bindEvents: ->
@element.click (e) =>
return unless _.any(@validClickElementCallbacks, (fn) -> fn(e.target))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment