Page 1 of 2 12 LastLast
Results 1 to 10 of 11

Thread: Contractible Headers Script

  1. #1
    Join Date
    Apr 2005
    Posts
    8
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Contractible Headers Script

    hey, how can i make it so that the Contractible Headers Script divs are open by default, and still use the memorise which ones are open fuinction

    i added an onload function to the body and they opened the first time, but they were reversed on reload after closing some cus of the memory function,

    now ive turned off memory and im using an onload, but theres lots of scripts that do that so its a bit pointless.

    any help please?

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

    Default

    Warning: Please include a link to the DD script in question in your post. See this thread for the proper posting format for asking a question.

    Just add "display: block" into each of the Header DIVs. This is explaied near the bottom of the script page:

    One final thought. When the page first loads, by default all of the participating content are contracted until the user starts clicking on the headers. If you wish to make a particular content be visible from the start, you can use the CSS "display" property to accomplish this:

    <div id="sc1" class="switchcontent" style="display:block">
    "
    </div>

  3. #3
    Join Date
    Apr 2005
    Posts
    8
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    thanks alot, sorry i missed that

  4. #4
    Join Date
    Apr 2005
    Posts
    8
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    im still haveing problems, it wont work.
    heres my page

    and heresthe dd script
    can anyone help me?

    thanks

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

    Default

    Hmmm strange. Ok, try using Switch Content script instead (http://dynamicdrive.com/dynamicindex...chcontent.htm). The two scripts basically are the same as far as functionality (and even source code), so if that works, then I'll be updating Contractible Headers script with the same base code.

  6. #6
    Join Date
    Apr 2005
    Posts
    8
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    ill give it a try, just a sec

  7. #7
    Join Date
    Apr 2005
    Posts
    8
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    it doesnt work either for me...

    it could well be a prob on my side, the js spoono.com menu doesnt work for my pc even tho i got the most recent firefox and ie

    http://www.gfxproject.com/dont-remove-me/divs2.htm

    does it work for you?

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

    Default

    Well, you inserted style="display:block" in the wrong tag. It shouldn't go in the headers (<h3>), but the DIV that it actually contracting/ expanding:

    <div id="sc3" class="switchcontent" style="display: block">
    DHTML is the embodiment of a combination of technologies- JavaScript, CSS, and HTML. Through them a new level of interactivity is possible for the end user experience.
    </div>

  9. #9
    Join Date
    Apr 2005
    Posts
    8
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    ouch sorry bout that

    thanks for the help anyway

    edit:

    i didnt do that in the first page tho

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

    Default

    Does it work now for you? When testing, be sure to close your browser and restart it first, to clear the persistence.

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
  •