Reputation: 11
Hi I would like to load a page using iFrame on my website. and as a final result I need to hide everything and show just one div's inner text. How can I accomplish it using jQuery? or maybe another workaround
Upvotes: 1
Views: 2248
Reputation:
<b>$("#test").contents().find("#content").setAttribute("style","display:none");</b>
Sorry I believe this is better suited to what your looking to do.
Upvotes: 1
Reputation:
Assuming you have
Iframe contains div with id='someID'
:
<div id="someID">Hello world!</div>
Use the following to access the HTML
$('#iframeID').contents().find('#someID').style('display:none;');
Upvotes: 2