Results 1 to 3 of 3

Thread: Switch Content Script - disable contract if possible

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

    Default Switch Content Script - disable contract if possible

    1) Script Title:
    Switch Content Script

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

    3) Describe problem:
    After expanding an item, I want to disable the contraction if the user clicks on the link a 2nd time.

    Reason: using this for simple top-level navigation. I always want to have 1 DIV expanded at any given time.

    Example:
    ContentLink1 - Content1 (expanded by default when the page loads)
    ContentLink2 - Content2 (hidden)
    ContentLink3 - Content3 (hidden)
    ContentLink4 - Content4 (hidden)

    User is at the main page (content1) and clicks on ContentLink2.

    Result:
    ContentLink1 - Content1 (hidden)
    ContentLink2 - Content2 (expanded)
    ContentLink3 - Content3 (hidden)
    ContentLink4 - Content4 (hidden)

    Up to this point, it works as expected. However, if the user clicks on ContentLink2 AGAIN the following happens:

    ContentLink1 - Content1 (hidden)
    ContentLink2 - Content2 (hidden)
    ContentLink3 - Content3 (hidden)
    ContentLink4 - Content4 (hidden)

    The result is no content on the page. Is there any way to disable ContentLink2 when that link has been clicked? This would ensure content is always on the page.
    Last edited by k9brand; 03-14-2010 at 09:37 PM.

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

    Default

    Have you checked out this thread: http://www.dynamicdrive.com/forums/s...ad.php?t=29477
    DD Admin

  3. The Following User Says Thank You to ddadmin For This Useful Post:

    k9brand (03-14-2010)

  4. #3
    Join Date
    Mar 2010
    Posts
    2
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default

    thanks!

    I did do a search before I posted, but missed that one.

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
  •