Connecting Tech Pros Worldwide Forums | Help | Site Map

div show and hide effect

Guest
 
Posts: n/a
#1: Nov 22 '08
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 ?


Mark Rae [MVP]
Guest
 
Posts: n/a
#2: Nov 22 '08

re: div show and hide effect


<ambrozyK2@poczta.onet.plwrote in message
news:gg7lph$bho$1@news.onet.pl...
Quote:
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('.......');" />


--
Mark Rae
ASP.NET MVP
http://www.markrae.net

Closed Thread