I am developing a html5 game app and I have two sections in my page, the menu and the game, which is in iframe.
when I open the app just the menu appears and if I click play’ the menu is hidden (with jquery) and it writes in the Game section the iframe element:
(<iframe src="Game.html class="GameFrame" ></iframe>)
also in jquery.
Now, the problem is that I cannot find a way to quit the iframe and show again the menu section.
Has anybody an idea?
Thank you,
Boaz
I am developing a html5 game app and I have two sections in my
Share
Basically you want to access parent
windowfrom inneriframe. Usewindow.parentto access parent window.If you have jQuery in parent window, you can access it by
window.parent.$from inner iframe and from there you know how to show/hide things.For example:
(in iframe)