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