k9brand
03-14-2010, 07:47 PM
1) Script Title:
Switch Content Script
2) Script URL (on DD):
http://www.dynamicdrive.com/dynamicindex17/switchcontent.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.
Switch Content Script
2) Script URL (on DD):
http://www.dynamicdrive.com/dynamicindex17/switchcontent.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.