Reputation: 107
Jquery div in iframe hide and text show
<iframe></iframe> - hide
<div>Offline mode!</div> - show?
Upvotes: 0
Views: 464
Reputation: 14588
If u want to manipulate iframe's elements, then u can have a great support from this tutorial.
If u want to hide the iframe, then here is a simple example is given for u-
$(document).ready(function(){
$("iframe").hide();
$("#hide").click(function(){
$("iframe").hide();
$("p").show();
});
$("#show").click(function(){
$("iframe").show();
$("p").hide();
});
});
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.0/jquery.min.js"></script>
<iframe src="http://www.w3schools.com/html/demo_iframe.htm" width="200" height="200"></iframe>
<p>Offline Mode</p>
<button id="hide">Hide</button>
<button id="show">Show</button>
I am not clear about your requirement yet, so I had to answer in this 2 way.
Upvotes: 1