Jump to content

Problem using <div> to hide/unhide the game


wongkh
 Share

Recommended Posts

Hi. I'm using Phaser v2.11.0 for my game.
When using <div> to hide and unhide the game, sometimes it will took few sec to unhide the game.
Any method to solve this problem? If I want to hide the game and unhide it later without the delay time.

The code I use to hide/unhide game and other div

function unhide_game () {
    document.getElementById("game").style.display = "block";
    document.getElementById("other_div").style.display = "none";
}

function hide_game () {
    document.getElementById("game").style.display = "none";
    document.getElementById("other_div").style.display = "block";
}

Thanks~

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...