-1

HTML:

<iframe src = "https://newsela.com"></iframe>

I don't want the menu that's shown above.
Is there a way to do that with JavaScript or jQuery?
Cursor
  • 111
  • 1
  • 1
  • 13
  • Probably not, unless your page is also hosted at `https://newsela.com`. The contents of the iframe are protected by the [same origin policy](https://developer.mozilla.org/en-US/docs/Web/Security/Same-origin_policy), which prevents manipulation by other sites/origins. – Jonathan Lonowski Feb 18 '18 at 00:57

1 Answers1

1

You can do something like that :

var myIFrame = document.getElementById("my_iframe");

var content = myIFrame.contentWindow.document;

content.getElementById("header").style.display = "none";

You will have to do a proxy on your server to have the same domain name

Tom DARBOUX
  • 462
  • 4
  • 9