title: Forcing Script To Run In AJAX Loaded Page
body: <p>So I am using an AJAX loader on my WP installation and one of the pages I am loading has a script in it.</p>
  
  <pre><code>&lt;div id="register-form"&gt;
      &lt;div id="register-one"&gt;&lt;/div&gt;
      &lt;div style="text-align:center;padding-top:10px;"&gt;&lt;/div&gt; 
      &lt;div class="horizontal-rule"&gt;&lt;/div&gt;
      &lt;div id='register'&gt;
          &lt;div id="register-character"&gt;
          &lt;/div&gt;
      &lt;/div&gt;
  
      &lt;div class="post"&gt;  
          &lt;form action="" method="post" id="register-form" &gt;
          What's your Name:
              &lt;input class=in id='register_name' name="register_name" onkeydown='register_step1_keydown();' onkeyup='register_step1_keyup();'&gt;
              &lt;input class="next-submit-button" type="submit" id="register-step-one" value="" /&gt;
              &lt;input type="hidden" name="submit" /&gt;
          &lt;/form&gt;  
      &lt;/div&gt;
  &lt;/div&gt;
  
  &lt;script type="text/javascript"&gt;
  
  $("#register-step-one").click(function() {
      $.ajax({
        type: "POST",
        success: function() {
          $('#register-form').html("Test");
        }
       });
      return false;
  });
  
  &lt;/script&gt;
  </code></pre>
  
  <p>The issue is however, when the page is loaded through the AJAX, the script doesn't work. Yet if I refresh the page the script works. Obviously the script doesn't like running from an AJAX call. </p>
  
  <p>Is there a way to make the script work when it is loaded through an AJAX call? I know I could put the script in to the main page's footer or something but I was hoping I could get around this as I will end up with a ton of scripts in the main page.</p>