I'm trying to add a popover via an ajax call with rails. I see in firebug that the content loads fine, but the popover isn't loading.
All other popovers work on the page, and if I reload the page, the popover works too...but it just doesn't work on the ajax call. What am I missing?
update.js
$("#new-pins").append("<div class='pinimage' data-original-title=''><img src='/images/<%= @changes[0] %>.png' class='pinimage' data-content='hello' data-original-title=''></a></div>")
show.html popover javascript:
<script>
$(function () {
$('.pinimage').popover({ html : true });
});
</script>
Here's what loads after the ajax call:
<div class="pinimage" data-original-title="">
<img class="pinimage" data-original-title="" data-content="hello" src="/images/card.png">
</div>
Thank you for any help!