tags:

views:

74

answers:

2

I created custom wizard that uses hidden divs for wizard pages. Here is the demo and the source code.

You will notice that on each refresh (F5 or ctrl-r) of a browser, divs with input boxes will be shown for couple of (mili)seconds. Is there a way to eliminate this effect?

This question is connected with how-to-preserve-textbox-values-on-client-side-using-wizard-next-and-back-button

+4  A: 

Set the CSS style for the ids that should initially be hidden to include "display:none;". Then, the browser should only display the div when you've used JQuery's show() (or the equivalent).

John Fisher
But I already did that with this jquery code on document ready// Hide all pages save the first. $("#wizardContainer").children(".wizardpage").hide(); $("#wizardContainer").children(".wizardpage:first").addClass("active").show();
nemke
This seems to happen only "onload" you should get them to be hidden in the first place. John seems to be right.
Ehrann Mehdan
Works like a charm :) http://jsbin.com/uxive
nemke
+2  A: 

Putting jquery aside, it seems that the code that hides the divs is happening onload.

Up until then, they show up. Like John Fisher has commented, set them to be hidden by default (either CSS or inline to display:none)

Ehrann Mehdan
Thanks, John was right, and so did you. I should put divs initially hidden and not using jquery for it.
nemke