div show and hide effect

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Guest's Avatar

    div show and hide effect

    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]

    #2
    Re: div show and hide effect

    <ambrozyK2@pocz ta.onet.plwrote in message
    news:gg7lph$bho $1@news.onet.pl ...
    How to do it ?
    function toggleDiv(_div)
    {
    if(document.get ElementById(_di v).style.displa y =="none")
    {
    document.getEle mentById(_div). style.display=" block";
    }
    else
    {
    document.getEle mentById(_div). style.display=" none";
    }
    }

    <input type="button" value="ToggleDi v" onclick="toggle Div('.......'); " />


    --
    Mark Rae
    ASP.NET MVP


    Comment

    Working...