div show and hide effect

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi,

I would like to have effect like this on my page:
When I click the button, the div is showing up and growing to his size
(barging other elements).
When I click the button second time, div start to shrink and disappear
(other elements back to theirs positions).
I don't want to have div like popup, but div like element of page (which
barge another elements).
(in my opinion: Animation Extender -
http://www.asp.net/learn/ajax-videos/video-117.aspx - doesn't allow
something like this - because it's like popup).

How to do it ?
 
[...]
function toggleDiv(_div)
{
if(document.getElementById(_div).style.display =="none")
{
document.getElementById(_div).style.display="block";
}
else
{
document.getElementById(_div).style.display="none";
}
}

<input type="button" value="ToggleDiv" onclick="toggleDiv('.......');" />

But I thought about something with animation, not just show and hide..
 
goto JQuery.com and start reading...

George.

[...]
function toggleDiv(_div)
{
if(document.getElementById(_div).style.display =="none")
{
document.getElementById(_div).style.display="block";
}
else
{
document.getElementById(_div).style.display="none";
}
}

<input type="button" value="ToggleDiv" onclick="toggleDiv('.......');" />

But I thought about something with animation, not just show and hide..
 
Back
Top