Files
bbc-young-reporter/auto-refresh.md
Matthew Grove 6b27c4f6d4 Hide refreshing
Use two iframes, and display the one that is in the process of 
refreshing below the other. Alternate between showing the two.
2019-03-06 12:02:52 +00:00

1.5 KiB

title, description, layout
title description layout
BBC Young Reporter News articles written by Reading School students in year 8 none
Tweets by BBCYoungReport <script async src="https://platform.twitter.com/widgets.js" charset="utf-8"></script> <script> window.setInterval(function() { document.getElementById('articles-1').style.zIndex = "2"; document.getElementById('articles-2').style.zIndex = "1"; document.getElementById('articles-2').contentWindow.location.reload(); document.getElementsByClass('twitter-timeline')[0].contentWindow.location.reload(); setTimeout(function() { document.getElementById('articles-2').style.zIndex = "2"; document.getElementById('articles-1').style.zIndex = "1"; document.getElementById('articles-1').contentWindow.location.reload(); }, 10000) }, 20000); </script> <style> html, body { width: 100%; } html, body, iframe { height: 100%; margin: 0; padding: 0; border: none; } .articles { width: 70%; position: absolute; top: 0; left: 0; } #articles-1 { z-index: 2; } #articles-2 { z-index: 1; } .twitter-timeline { width: 30% !important; float: right; } </style>