I have a form in jQuery that is submitted remotely:
<%= form_for @order, :remote => true do |f| %>
On the client I am binding to the form submit event (in coffee script):
$('#new_order').live 'submit', (e) ->
and I want to prevent the rails remote form submit but I can't seem to get it working, I've tried:
e.preventDefault()
e.stopPropagation()
return false
None of these seemed to work. I'm fairly new to Rails so I was wondering if I was missing something about the remote submit handler?
EDIT:
I've found that it works if I use bind
instead of live