title: jQuery script has to be run after ajax call
body: <p>I am using jQuery in one of my velocity macro template  (i.e. content footer which will be loaded the last).</p>
  
  <p>This script works in all the pages except one page. On that page, after the page is completely rendered, a <em>table is inserted in the middle of the page</em>. So I tried with onload function, still no luck.</p>
  
  <pre><code>&lt;table id="ArtifactListTable" class="ItemListTable"&gt; 
  &lt;!-- this table is inserted after ajax     request --&gt;
  
  &lt;script&gt;
    window.onload = function() { 
       jQuery('.priority1').text('P1');
       jQuery('.priority2').text('P2');
       jQuery('.priority3').text('P3');
       jQuery('.priority4,.priority5').text('None');
  
       jQuery('.priority4,.priority5').addClass('priority0').removeClass('priority4 priority5');
    };
  
  &lt;/script&gt;
  </code></pre>
  
  <p>I need to <strong>run my jQuery after this AJAX load function</strong> (I have no control over ajax). I can only deal with my jQuery.</p>