How to apply a jQuery function to a child page in an iframe?
Here's a brainteaser:
I have an iframe in a window, and a navbar that links to it:
<div class="nav">
<a href="link.html" target="iframe-content" id='debug">#Debug<a>
</div>
<iframe name="iframe-content" src="page.html"></iframe>
I've then got a simple jQuery function to inset a class when a link in the
nav is clicked.
$(window).load(function() {
$("#debug").click(function() {
$('body').toggleClass("debug");
});
});
Now my question is how do I get the toggleclass to apply to the inline
frame (page.html) and not the parent page?
No comments:
Post a Comment