jQuery show/hide behavior on page reload

a, by default, hidden gamecontainer

<div id="gamecontainer"> 

is set on click to

 $("#gamecontainer").show

when I do a page refresh under

/route/:id 

the program resets to the initial state and the gamecontainer is hidden again.

  1. is this typical meteor behavior - I assume it is ?
  2. how can you work around this ?

Isn’t that just typical jQuery behaviour? I don’t think it’s specifically Meteor related. A page refresh will refresh the DOM too, which will mean it restores to default (in this case hidden).

You could try a session state for the container? I’m sorry, I don’t have a working example and I’m at work right now, but that’s the only way I can think of that may work.

1 Like

Thank you - I think that session container will be the answer. I have
not figured out how to blend out the default html layout when on
/route/:id with that technique yet.

The behavior is not really desirable: if a player refreshes, the game is gone

Regards

Eckhart