Given:
<%=form_for [:project, @note], :remote => true do |f| %>
I'd like to create a jquery bind that automatically saves every few seconds. I'm not worried about the timing part yet, just how to use jquery to submit the form automatically (ie, not submit button click by the user.)
I tried this, but it isn't working. Suggestions?
$('form[data-remote]').live('submit', function (e) {
alert(1);
e.preventDefault();
});
Thanks!