Skip to content

Instantly share code, notes, and snippets.

@jonvargas
Created January 23, 2015 00:52
Show Gist options
  • Save jonvargas/d7391e0cbae45a54fd9b to your computer and use it in GitHub Desktop.
Save jonvargas/d7391e0cbae45a54fd9b to your computer and use it in GitHub Desktop.
function assignCompleteButtonToTaskForm ()
{
//alert ("initializing");
var completeButton = jQuery ('button.btn-task-form')[0];
var mainTaskForm = jQuery ('form.main-task-form')[0];
mainTaskForm.bind('submit', function(e) {
e.preventDefault();
this.submit();
});
completeButton.onclick = function (e) {
mainTaskForm.submit ();
}
//alert ("finishing");
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment