I’m trying to move a twitter widget from one container to another.
However, when the widget moves, it’s getting blank.
Using any dom explorer, I can see that its internal iframe’s body is empty.
How to workaround this?
A reproductible fiddle shows the behavior.
I’m trying to move the widget using jQuery.move:
$("#btnRepro").click(function() {
$("#wrapper").appendTo($("#right"));
});
The widget is produced using this snippet (generated on twitter website:
<div id='wrapper'>
<a class="twitter-timeline" href="https://twitter.com/hashtag/#dragnpoint" data-widget-id="709489444726968320">Chargement des tweets</a>
<script>
! function(d, s, id){var js, fjs = d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if (!d.getElementById(id)) {js = d.createElement(s);js.id = id;js.src = p + "://platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js, fjs);}}(document, "script", "twitter-wjs");
</script>
</div>
PS: actually crossposted on stackoverflow