This question is locked. New answers and comments are not allowed.
Greetings,
I have the following views setup:
And twitterInit() is just the standard timeline widget JS wrapped in a function:
This works only if I switch between the two views BEFORE the timeline loads (when you can only see the "Tweets by @"). If I stay on one view and wait for the timeline then go to the next one, it's empty. It essentially creates the two iFrames, but the view that isn't displayed gets a blank iFrame while the one displayed has a timeline full iframe... Any ideas why this happens? I can attach images of the elements if you need it.
I have the following views setup:
<!-- 3.3 Twitter View --><div data-role="view" id="DannyTwitter" data-init="twitterInit()" data-layout="twitterLayout"> <a class="twitter-timeline" href="https://twitter.com/USER" data-widget-id="ID1" data-chrome="noheader nofooter">Tweets by @</a> </div><!-- 3.4 Twitter View --><div data-role="view" id="LindseyTwitter" data-layout="twitterLayout" data-init="twitterInit()"> <a class="twitter-timeline" href="https://twitter.com/USER" data-widget-id="ID2" data-chrome="noheader nofooter">Tweets by @</a></div>And twitterInit() is just the standard timeline widget JS wrapped in a function:
<script>function twitterInit(){ !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>This works only if I switch between the two views BEFORE the timeline loads (when you can only see the "Tweets by @"). If I stay on one view and wait for the timeline then go to the next one, it's empty. It essentially creates the two iFrames, but the view that isn't displayed gets a blank iFrame while the one displayed has a timeline full iframe... Any ideas why this happens? I can attach images of the elements if you need it.