How can I access the content of an iframe with jQuery? I tried doing this, but it wouldn’t work:
iframe content: <div id="myContent"></div>
jQuery: $("#myiframe").find("#myContent")
How can I access myContent?
Similar to jquery/javascript: accessing contents of an iframe but the accepted answer is not what I was looking for.
You have to use the
contents()method:Source: https://web.archive.org/web/20180608003357/http://simple.procoding.net/2008/03/21/how-to-access-iframe-in-jquery/
API Doc: https://api.jquery.com/contents/