鉴于:
<%=form_for [:project, @note], :remote => true do |f| %>
我想创建一个每隔几秒自动保存的 jquery 绑定。我不担心时间部分,只是如何使用jquery自动提交表单(即,不是用户点击提交按钮。)
我试过这个,但它不工作。建议?
$('form[data-remote]').live('submit', function (e) {
alert(1);
e.preventDefault();
});
谢谢!