I am currently wokring on a sign up where I hide and show different inputs depending on where they are in the sign up process. At the moment, I have 4 inputs and I want to start off by hiding two of them. I know in jquery you can do this with .hide(). However, when I load the page, the two inputs appear and then disappear. What does .show() and .hide() do to the element? Does it change the display? How can I make it so that when the page loads the elements start off hidden and then I can call .show() when I need them?
The code I have now is below. What I want is for me to not have to call.hide() in the ready function and for the elements to start off hidden.
$(document).ready(function ()
{
//loads elements then hides them
$("#input3").hide();
$("#input4").hide();
//some time later when triggers are set and I want to show the inputs
$("#input3").show();
$("#input4").show();
}
What I want:
$(document).ready(function ()
{
//inputs 3 and 4 are already hidden
//some time later when triggers are set and I want to show the inputs
$("#input3").show();
$("#input4").show();
}