Skip to content

Instantly share code, notes, and snippets.

@johno
Created April 5, 2013 16:13
Show Gist options
  • Save johno/5320534 to your computer and use it in GitHub Desktop.
Save johno/5320534 to your computer and use it in GitHub Desktop.
Becoming a fanboy.
$ ->
subscription.hijackSubmitBtn()
subscription.hijackAgreeToTermsLink()
subscription =
hijackSubmitBtn: ->
$('#new_subscription').submit ->
if $('#terms_checkbox').is(':checked')
true
else
$('#terms').modal('show')
false
hijackAgreeToTermsLink: ->
$('.agree_to_terms_link').click ->
$('#terms').modal('show')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment