I have sidebar toggle event. When I clicked inside the iframe, the sidebar doesn't close. The Iframe is in the inside of div #maincontent. But when iframe has an src="" ( src="pr.php" ) the close event not worked. How I can close the sidebar when I clicked in iframe that does have any of src=" " ?
Here's my fiddle
<div class="framecontentLeft">
<div class="innertube">
</div>
</div>
<div id="framecontentTop">
<div class="sidebar-toggle"></div>
<div class="innertube">
</div>
</div>
<div id="maincontent">
<div class="innertube">
<iframe name="contents" src="http://stackoverflow.com" id="iframe1" frameborder="0" style="moz-overflow:hidden;moz-overflow-x:hidden;moz-overflow-y:hidden;height:100%;width:100%;position:absolute;top:0px;left:0px;right:0px;bottom:0px" height="100%" width="100%"> </iframe>
</div>
</div>
Part of the Script
var iframeDoc = $('#iframe1').contents().get(0);
$(iframeDoc).bind('click', function( event ) {
if(!sidebarStatus)
{
$('.sidebar-toggle').click();
}
});