I have created two webpages, one contains the other in an iframe. I would like to scroll the embedded page from the parent page via javascript.
What I have tried so far:
$('#go').scrollTop(200);
$('.footer').scrollTop(200);
var frame = document.getElementById('go');
frame.contentWindow.scrollTo(0, 200);
none of these have worked
the parent webpage html:
<html>
<body>
.
.
.
<div class="footer">
<iframe id="go" src="go.html"></iframe>
</div>
</body>
</html>
Both of these webpages are local files on the computer and I am using Google chrome with "--allow-file-access-from-files" flag.
How do I scroll the iframe to a certain position?