Connecting Tech Pros Worldwide Help | Site Map

div show and hide effect

  #1  
Old November 22nd, 2008, 01:05 AM
Guest
 
Posts: n/a
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 ?

  #2  
Old November 22nd, 2008, 01:35 AM
Mark Rae [MVP]
Guest
 
Posts: n/a

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
show/hide div not fully working in IE ryrocks answers 18 May 29th, 2008 11:02 AM
show/hide div not fully working in IE ryrocks answers 3 May 28th, 2008 02:06 PM
When I hide a div, the image in the div still visible in internetexplorer Faraz.ya@gmail.com answers 1 December 25th, 2007 11:05 PM
Top Drop Down Menu for IE that can overlay IE combo box and has fading effect Yuk Cheng answers 4 July 23rd, 2005 01:18 PM