Skip to content

Instantly share code, notes, and snippets.

@plasticine
Created September 5, 2011 03:49
Show Gist options
  • Select an option

  • Save plasticine/1194047 to your computer and use it in GitHub Desktop.

Select an option

Save plasticine/1194047 to your computer and use it in GitHub Desktop.
postForm: =>
# serialize and send the form to CM
# `url` will be `http://theconversation.createsend.com/t/r/s/foo`
url = "#{@form.attr('action')}?callback=?"
@showLoader( =>
$.getJSON(
url,
@form.serialize(),
(data) =>
@hideLoader()
@handleCMResponse(data)
)
)
<form action="http://theconversation.createsend.com/t/r/s/foo" method="post">
<div class="input-wrapper">
<input type="text" id="cm-foobar-foobar" name="cm-foobar-foobar" placeholder="Your email address" >
<input type="submit" value="subscribe &rarr;" class="input-button">
</div>
</form>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment