title: Execute Javascript after ajax response has been rendered
body: <p>I want to execute a piece of javascript after the ajax response has been rendered. The javascript function is being generated dynamically during the ajax request, and is in the ajax response. 'complete' and 'success' events to not do the job. I inspected the ajax request in Firebug console and response hasn't been rendered when the complete callback executes.</p>
  
  <pre><code>Does not work:
  
        function reloadForm() {
          jQuery.ajax({
            url: "&lt;generate_form_url&gt;",
            type: "GET",
            complete: custom_function_with_js_in_response()
          });
        };
  </code></pre>
  
  <p>ajaxComplete does the job, but it executes for all the ajax calls on the page. I want to avoid that. Is there a possible solution?</p>
  
  <pre><code>$('#link_form').ajaxComplete(function() {
    custom_function_with_js_in_response();
  });
  </code></pre>