Warning: Please include a link to the DD script in question in your post. See this thread for the proper posting format when asking a question.
You can have one collapsible DIV within another. Just make sure of the following:
1) The parent collapsible DIV doesn't have an explicit CSS height attribute declared that limits the overall height of the DIV.
2) If the parent collapsible DIV is part of a group (ie: animatedcollapse.addDiv('cat', 'fade=0,speed=400,group=pets')), that the child collapsible DIV isn't declared as part of the same group (so no group=pets when initializing it).
Here's a working demo:
Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<script type="text/javascript" src="jquery-1.2.2.pack.js"></script>
<script type="text/javascript" src="animatedcollapse.js">
/***********************************************
* Animated Collapsible DIV v2.0- (c) Dynamic Drive DHTML code library (www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit Dynamic Drive at http://www.dynamicdrive.com/ for this script and 100s more
***********************************************/
</script>
<script type="text/javascript">
animatedcollapse.addDiv('cat', 'fade=0,speed=400,group=pets')
animatedcollapse.addDiv('mycat', 'fade=0,speed=400,hide=1')
animatedcollapse.init()
</script>
<body>
<p><b>Example 4 (part of group "pets"):</b></p>
<a href="javascript:animatedcollapse.toggle('cat')"><img src="http://i25.tinypic.com/wa0img.jpg" border="0" /></a> <a href="javascript:animatedcollapse.show('cat')">Slide Down</a> || <a href="javascript:animatedcollapse.hide('cat')">Slide Up</a>
<div id="cat" style="width: 400px; background: #BDF381;">
The cat (Felis catus), also known as the domestic cat or house cat to distinguish it from other felines, is a small carnivorous species of crepuscular mammal that is often valued by humans for its companionship and its ability to hunt vermin. It has been associated with humans for at least 9,500 years. A skilled predator, the cat is known to hunt over 1,000 species for food. It can be trained to obey simple commands.
<br />
<a href="javascript:animatedcollapse.toggle('mycat')"><img src="http://i25.tinypic.com/wa0img.jpg" border="0" /></a>
<div id="mycat">
The cat (Felis catus), also known as the domestic cat or house cat to distinguish it from other felines, is a small carnivorous species of crepuscular mammal that is often valued by humans for its companionship and its ability to hunt vermin. It has been associated with humans for at least 9,500 years. A skilled predator, the cat is known to hunt over 1,000 species for food. It can be trained to obey simple commands.
</div>
</div>
Bookmarks