Results 1 to 8 of 8

Thread: (Animated Collapsible DIV) Remember Cookie until DIV is updated

  1. #1
    Join Date
    Jul 2008
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default (Animated Collapsible DIV) Remember Cookie until DIV is updated

    1) Script Title:
    Animated Collapsible DIV v2.01

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

    3) Describe problem:

    hi,

    first off: love the script; kudos to the developer.
    now to my problem...

    i am using the collapsible div as some sort of "push update", that is, one-liner get displayed and can then be clicked away by the user.

    what i would like to do is set a cookie which "remembers" the collapsed state of the div all the time until i update the div with new content.
    is this possible?

    regards and thanks in advance,

    house

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

    Default

    Well, persistent cookies in JavaScript is certainly possible, but the real question is how you plan to notify the script that a DIV should be collapsed and for how long. It's as much about how the rest of your system works as it is about the collapsible script itself.

  3. #3
    Join Date
    Jul 2008
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    so... possible?

    what i basically would like to have is a system similiar to 37signals backpackit...
    the have this announcements where you can collapse the div until the next announcement.

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

    Default

    Well it's possible as mentioned, but exactly how to do this is also dependent on how the announcements are being pushed. In other words, it's not a matter of modifying Animated Collapsible DIV itself with a new feature. This part can be considered an independent feature:

    what i would like to do is set a cookie which "remembers" the collapsed state of the div all the time
    but certainly not this part without first having some way to inform the script that new content has been served:
    until i update the div with new content.

  5. #5
    Join Date
    Jul 2008
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    alright...
    is there any way you could implement this for me or is it just too much work/time consuming/... ?

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

    Default

    The complexity really depends on the other half of your equation- that is, how you're updating the DIVs with new content, either manually, or server side. You'll need to provide details on that.

  7. #7
    Join Date
    Jul 2008
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    actually i was thinking about just doing it manually, that is edit the div right on the server...

  8. #8
    Join Date
    Jul 2008
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    no offense, but are you going to do that or did you move on?
    sounded like you were going to code this...

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
  •