Script: animatedcollapse
http://www.dynamicdrive.com/dynamici...edcollapse.htm
I added the following method to the animatedcollapse script.
It is designed to apply animatedcollapse to a number of divs following a naming pattern with a numeric suffix.
It simply loops through the addDiv method already in the script.
I call it in the page with code like:Code:addDivs:function(substr, howmany){ for (i=0; i<howmany; i++) {this.addDiv(substr + i, "fade=1,hide=1") } },
In the div, the call to the toggle method works.Code:<script type="text/javascript"> animatedcollapse.addDivs('collapse', 6) animatedcollapse.init() </script>
However the rel does not work.Code:<a href="javascript:animatedcollapse.toggle('collapse0')"<img src="img/down.png">heading text</a> <div id="collapse0">collapse content</div>
I prefer the rel to manage the up and down arrows and that works fine if the individual divs are set up line by line with the addDiv method.Code:<a href="#" rel="toggle[collapse0]" data-openimage="up.png" data-closedimage="down.png">heading text</a> <div id="collapse0">collapse content</div>
What am I doing wrong?
Thanks



Reply With Quote

Bookmarks