title: Javascript/Jquery stops working after Ajax call
body: <p>I have an ajax call that works great the first time the form is submitted after that all javascript on the page seems to break. As well as the form won't submit with ajax again. </p>
  
  <p>Here is my ajax call: </p>
  
  <pre><code>$('form').submit(function(event) {
     $('input:submit').attr("disabled", true).after('&lt;p class="loading"&gt;Searching...&lt;/p&gt;');
  
  $.ajax({
    type: "POST",
    url: pathname,
    data: $(this).serialize(),
    success: function(data) {
      $('#container').html("&lt;div id='message'&gt;&lt;/div&gt;");
      $('#message').append(data).hide().fadeIn(1500);
    },
  });
  event.preventDefault();
  });
  </code></pre>
  
  <p>I'm getting no errors in my console. Any ideas what might be causing this? </p>