title: Reloading canvas javascript after ajax call
body: <p>Scenario: Canvas based portfolio items listed with ajax driven pagination. </p>
  
  <p>Problem: After loading the next page of content with ajax, script tags aren't inside the canvas tags.</p>
  
  <p>Tried: Adding script tags before the canvas tags, this isn't loaded either (so definitely a problem loading scripts). </p>
  
  <p>Research: <a href="https://stackoverflow.com/questions/2162496/inline-jquery-script-not-working-within-ajax-call">jquery script not working</a>, apparently you can't retrieve scripts because of security.</p>
  
  <p>Possible alternative: Adding the canvas content from outside the canvas tags, but then the difficulty comes in passing the dynamically created portfolio title tags!</p>
  
  <p>Code:</p>
  
  <pre><code>    &lt;ul id="products-list"&gt;
          &lt;?php
              $i = 0;
              while($the_list-&gt;have_posts()): $the_list-&gt;the_post(); //wordpress loops through posts
          ?&gt;
  
          &lt;li  class="product-item&lt;?php echo $i;?&gt;"&gt;
              &lt;script&gt;functionForMakingACanvasOverlayUsingThePostTitle("&lt;?php echo get_the_title() ?&gt;");&lt;/script&gt;
              &lt;canvas&gt;&lt;/canvas&gt;
          &lt;/li&gt;
  
          &lt;?php $i++; ?&gt;  
  
      &lt;?php endwhile; ?&gt;
      &lt;/ul&gt;
  </code></pre>
  
  <p>6 items are shown per page and the next button uses ajax to call the next 6 items</p>
  
  <p>Suggestions? Thanks.</p>