Hide An Image Within An Iframe
I have the following page in an iframe. This page can be accessed outside the iframe as well. But what Id like to do is hide the logo (id=llogo) in the frame but display it when ac
Solution 1:
I think that you cannot do it with CSS.
But you can try with Javascript. Using jQuery, you can do something like this:
jQuery(document).load(function(){
jQuery('div#llogo', frames['contentFrame']).hide();
});
Remember to set the name
attribute on the iframe element. In my example, the name must be contentFrame, but you can set it as you like.
Beware that the page in the iframe must be on the same domain of the parent page, otherwise you can't access the iframe content through javascript, due to the Same Origin Policy. See this other question for more details: jQuery/JavaScript: accessing contents of an iframe
Post a Comment for "Hide An Image Within An Iframe"