jQuery submit() not firing when triggered from live()
<p>I'm trying to get the form <code>#url_form</code> to be submitted when a URL is pasted into <code>#video_url</code>. The <code>.loading</code> class is added correctly, but the form still isn't being submitted.
Here's the code:</p>

<pre><code> $(document).ready(function(){
  $("#url_form").live("paste", "#video_url", function(){
    $("#video_url").addClass("loading");
    $("#url_form").submit();
  });
});
</code></pre>

<p>and the HTML:</p>

<pre><code>&lt;form accept-charset="UTF-8" action="/posts/get_video" data-remote="true" id="url_form" method="post"&gt;
   &lt;input autofocus="autofocus" class="post-modal-url loading" id="video_url" name="video_url" placeholder="Paste a URL here" required="required" type="url"&gt;
&lt;/form&gt;
</code></pre>

<p>the Rails form_tag:</p>

<pre><code> &lt;%= form_tag get_video_posts_path, :remote =&gt; true, :id =&gt; "url_form"  do -%&gt;
    &lt;%= url_field_tag 'video_url', params[:video_url], :placeholder =&gt; "Paste a URL here", :required =&gt; true, :autofocus =&gt; true, :class =&gt; "post-modal-url" -%&gt;
  &lt;% end -%&gt;
</code></pre>
