Results 1 to 5 of 5

Thread: Animated collapse

  1. #1
    Join Date
    Mar 2009
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question Animated collapse

    1) Script title: Animated Collapse div v2.2
    2) Url: http://www.dynamicdrive.com/dynamici...edcollapse.htm

    3) Describe problem: Hy, I have a problem setting up this code. I want to put cookies into it, so when the panel is collapsed to remain that way when I refresh the page
    One more thing, when I the div is expand to have a picture, and when is colapsed another picture. I've looked @ here, but nothing that could help me. Thanks in advance

  2. #2
    Join Date
    Aug 2004
    Posts
    10,143
    Thanks
    3
    Thanked 1,008 Times in 993 Posts
    Blog Entries
    16

    Default

    Please read the documentation. Both of your questions should be answered in it already. For persistence, just define the attribute "persist=1" when calling addDiv(), while for the second part, the ontoggle() event should do what you need for it.
    DD Admin

  3. #3
    Join Date
    Mar 2009
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Well thanks for the second problem and for you're answer in sort time. But i don't get it. I have this:
    Code:
    <script type="text/javascript">
    
    animatedcollapse.addDiv('news', 'fade=1,speed=500,persist=1')
    animatedcollapse.addDiv('polls', 'fade=1,speed=500,persist=1')
    animatedcollapse.addDiv('stats', 'fade=1,speed=500,persist=1')
    animatedcollapse.addDiv('active', 'fade=1,speed=500,persist=1')
    animatedcollapse.addDiv('sb', 'fade=1,speed=500,persist=1')
    
    animatedcollapse.init()
    
    </script>
    Those divs do not persist when I refresh page. Any ideea ? Tell me please how to make it for example I have this:
    Code:
    <h2><a href="javascript:animatedcollapse.toggle('active');putCookie('active');">Active users <img src=pic/hide.gif title=Show/Hide alt=Show/Hide border=0></a></h2>
    <div id="active">
    <table class=main width="767" border=0 cellspacing=0 cellpadding=0><tr><td class=embedded>
    
    <table width="100%" border=1 cellspacing=0 cellpadding=10><tr><td class=text>
    
    <br />
    Welcome to our newest member, <b><?=$latestuser?></b>! <br />
    Most users online was: <strong><?=$rec[users]?></strong> on <strong><?=$rec[date]?></strong> <br />
    
    Most ever visited in 24 hours was <strong><?=$totalonline24?></strong> <br />
    
    
    <hr />
    <strong>Active users(<?=$totalonline?>):</strong> <?=$activeusers?>
    
    <?  ?>
    </table></td></tr></table></div>
    it doesn't work when I refresh page

  4. #4
    Join Date
    Aug 2004
    Posts
    10,143
    Thanks
    3
    Thanked 1,008 Times in 993 Posts
    Blog Entries
    16

    Default

    It should work (confirmed this using the default demo on the script page), though without seeing the fully rendered HTML of your page, it's hard to say why it doesn't. Please post a link to the page on your site that contains the problematic script so we can check it out.
    DD Admin

  5. #5
    Join Date
    Mar 2009
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    here is the link: http://rds-zone.ro
    here is an account to log in and see:
    Username: Test
    password: test

    Animated collapse function is on the first page (Home)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •