Skip to content

Instantly share code, notes, and snippets.

@softprops
Forked from mbbx6spp/page.coffee
Created March 9, 2011 15:09
# Creative Commons Attribution-Share Alike 3.0 United States License
# http://creativecommons.org/licenses/by-sa/3.0/us/
# By Susan Potter <http://geek.susanpotter.net>
(($) ->
editSubmitHandler: (evt) ->
form: $(this)
data: form.serialize()
url: form.attr('action')
$.getJSON(url, data, (data, resp) ->
$('#notice').html(data['html'])
)
$('#editForm').submit(editSubmitHandler)
) jQuery
// Creative Commons Attribution-Share Alike 3.0 United States License
// http://creativecommons.org/licenses/by-sa/3.0/us/
// Generated from CoffeeScript translator of previous CS code.
(function($) {
var editSubmitHandler;
editSubmitHandler = function editSubmitHandler(evt) {
var data, form, url;
form = $(this);
data = form.serialize();
url = form.attr('action');
return $.getJSON(url, data, function(data, resp) {
return $('#notice').html(data['html']);
});
};
return $('#editForm').submit(editSubmitHandler);
})(jQuery);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment