PDA

View Full Version : Animated Collapsible DIV on IE6&7



vich
02-06-2010, 06:25 AM
1) Script Title: Animated Collapsible DIV v2.4

2) Script URL (on DD):
http://www.dynamicdrive.com/dynamicindex17/animatedcollapse.htm

3) Describe problem:
On both IE 6 and 7, the script does not seem to be functioning. I have a list of links using the script and the div that is suppose to appear upon clicking just shows up on initial load. Clicking the links just shifts the div slightly downward and it quickly moves back up. Also my styles from my CSS stop functioning after the first div on the list.

ddadmin
02-06-2010, 09:06 AM
My guess is IE is tripping up on the structure of your accordion contents. That is, you're dividing LIs arbitrarily using DIV tags- I may be wrong, but that isn't allowed in HTML. Try changing your menu headers to DIV tags, and each group of accordion content as a UL list instead. So instead of say:


<li><a href="javascript:animatedcollapse.toggle('promo')">Promotional Material</a></li>
<div id="promo" style="display:none">
<li id="sub_menu"><a href="alive_asia">Alive Asia</a></li>
<li id="sub_menu"><a href="willow">Lakeland Willow Water</a></li>
<li id="sub_menu"><a href="transair">TransAir</a></li>
<li id="sub_menu"><a href="ex_woodcraft">Exclusive Woodcraft</a></li>

<li id="sub_menu"><a href="ibi_brochures">IBI Group Brochures</a></li>
<li id="sub_menu"><a href="cityscape">IBI Group Cityscape</a></li>
</div>


Change that to:


<div><a href="javascript:animatedcollapse.toggle('promo')">Promotional Material</a></div>
<ul id="promo" style="display:none">
<li id="sub_menu"><a href="alive_asia">Alive Asia</a></li>
<li id="sub_menu"><a href="willow">Lakeland Willow Water</a></li>
<li id="sub_menu"><a href="transair">TransAir</a></li>
<li id="sub_menu"><a href="ex_woodcraft">Exclusive Woodcraft</a></li>

<li id="sub_menu"><a href="ibi_brochures">IBI Group Brochures</a></li>
<li id="sub_menu"><a href="cityscape">IBI Group Cityscape</a></li>
</ul>

vich
02-06-2010, 09:42 AM
Awesome! That did the trick. Thank you so much!