showing/hiding divs with jquery

satya - Tue May 01 2012 14:48:45 GMT-0400 (Eastern Daylight Time)

Here are my earlier notes on this subject without jquery

Here are my earlier notes on this subject without jquery

satya - Tue May 01 2012 14:49:14 GMT-0400 (Eastern Daylight Time)

with jquery you can do this


function showformdiv()
{
   $("#formdiv").show();
   $("#showformDivId").hide();
   $("#hideformDivId").show();
}
function hideformdiv()
{
   $("#formdiv").hide();
   $("#showformDivId").show();
   $("#hideformDivId").hide();
}

satya - Tue May 01 2012 14:49:37 GMT-0400 (Eastern Daylight Time)

of course you have to name your divs accordingly

of course you have to name your divs accordingly

satya - Tue May 01 2012 14:50:08 GMT-0400 (Eastern Daylight Time)

jquery show() hide()

jquery show() hide()

Search for: jquery show() hide()

satya - Tue May 01 2012 14:51:11 GMT-0400 (Eastern Daylight Time)

wondering if they have additional options

because if I hide my div with hidden visibility as a style argument, it gets messed up. So I am wondering if show and hide has other arguments to correctly rewrite the style of the div.

satya - Tue May 01 2012 15:03:00 GMT-0400 (Eastern Daylight Time)

show does its magic by controlling the display property of style

show does its magic by controlling the display property of style

satya - Tue May 01 2012 15:03:19 GMT-0400 (Eastern Daylight Time)

So do this for your div if you want to hide it to start with


<div id="hideformDivId" style="display:none">

satya - Tue May 01 2012 15:03:42 GMT-0400 (Eastern Daylight Time)

here is jquery help on show

here is jquery help on show