Skip to content

Instantly share code, notes, and snippets.

@ileitch
Created January 1, 2012 15:02
Show Gist options
  • Select an option

  • Save ileitch/1547539 to your computer and use it in GitHub Desktop.

Select an option

Save ileitch/1547539 to your computer and use it in GitHub Desktop.
$(document).ready ->
$('.actions-modal').actionsModal()
$.fn.actionsModal = (options) ->
new ActionsModal(this, options)
class ActionsModal
constructor: (@modal, @options) ->
@switchers = $('.switchers a', @modal)
@switchers.click @switch
console.log(@switchers)
switch: (e) ->
e.preventDefault()
console.log(this)
@switchers.hide()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment