Results 1 to 3 of 3

Thread: Animated collapsible div v2.4 -- DIV starts shown with persist=1

  1. #1
    Join Date
    Nov 2010
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Animated collapsible div v2.4 -- DIV starts shown with persist=1

    1) Script Title: Animated collapsible div v2.4

    2) Script URL (on DD): http://www.dynamicdrive.com/dynamici...edcollapse.htm

    3) Describe problem:
    The following works as expected.
    A page with 3 DIVs like this:
    <a onclick="animatedcollapse.toggle('DivName');">toggle</a>
    <div id="DivName" style="width:100%; display:none;">
    some text
    <a onclick="animatedcollapse.hide('DivName');">hide</a>
    </div>


    In the HEAD:
    <script type="text/javascript" src="includes/jquery.min.js"></script>
    <script type="text/javascript" src="includes/animatedcollapse.js"></script>
    <script type="text/javascript">
    animatedcollapse.addDiv('DivName', 'fade=1');
    </script>


    All three DIVs can be toggled and hidden as you would expect. But when I change the part in the HEAD to:
    animatedcollapse.addDiv('DivName', 'fade=1,persist=1');
    Then the three DIVs are all shown when the page loads. Closing one or more and then reloading(F5) the page keeps them closed. But when I navigate away to another page, and then back to the page via a link, the DIVs are all shown again.

    I've tried adding hide=1 and adding the inline CSS to an external CSS file, but the result is the same. This happens in Firefox 3.5.9 and IE7.

    The page validates as HTML 4.01 Transitional and Firefox's Error Console doesn't display any errors or warnings.

    What am I missing here?

  2. #2
    Join Date
    Jul 2008
    Location
    Derbyshire, UK
    Posts
    3,033
    Thanks
    25
    Thanked 599 Times in 575 Posts
    Blog Entries
    40

    Default

    Unique div IDs for a guess but you haven't provided a link so there's no way for us to be sure.

    If you need further troubleshooting help then you need to post a link to your page.
    Focus on Function Web Design
    Fast Edit (A flat file, PHP web page editor & CMS. Small, FREE, no database!) | Fast Edit BE (Snippet Manager) (Web content editor for multiple editable regions!) | Fast Apps

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

    Default

    Please post a link to the page on your site that contains the problematic script so we can check it out.
    DD Admin

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
  •