div show and hide effect

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 ?
 
G

Guest

[...]
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..
 
G

George

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..
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,767
Messages
2,569,572
Members
45,046
Latest member
Gavizuho

Latest Threads

Top