I have a jQuery script that appends the Instagram blockquote, but it doesn't work on the second append. The first time it gets appended, the blockquote converts to the iframe like it should, but if I try it again, it just stays a blockquote.
function appendInstagram($controls){
var instagramURL = $('#js-instagram-url-edit').val();
var instagramScript = '<script async defer src="//platform.instagram.com/en_US/embeds.js"><\/script>'
var instagramHtml = $('<blockquote class="instagram-media"
data-instgrm-captioned data-instgrm-version="7">
<div style="padding:8px;">
<a href="'+instagramURL+'" target="_blank"></a>
</div>
</blockquote>' + instagramScript);
updateContent(instagramHtml, $controls);
}
The idea is when this function gets excecuted, the blockquote gets appended through updateContent()