Skip to content

Instantly share code, notes, and snippets.

@cmer
Created February 3, 2012 20:48
Show Gist options
  • Save cmer/1732423 to your computer and use it in GitHub Desktop.
Save cmer/1732423 to your computer and use it in GitHub Desktop.
class @GroupActionMenuHandler
bind: ->
$(document).on 'click', '.group-action-menu a', (e) =>
# The following line triggers error: GroupActionMenuHandler.selectMenuItem is not a function
this.selectMenuItem $(e.target).data('id')
false
selectMenuItem: (selectedItem) ->
alert 'hello'
<script>
$(document).ready(function() {
groupActionMenuHandler = new GroupActionMenuHandler();
groupActionMenuHandler.bind()
})
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment