Regarding the code that I had posted:
Code:
<script type="text/javascript">
var animatedids=['jason', 'kelly', 'michael', 'cat', 'dog', 'rabbit']
for (var i=0; i<animatedids.length; i++){
animatedcollapse.addDiv(animatedids[i], 'fade=0,speed=400,group=pets,persist=1,hide=1')
}
animatedcollapse.init()
</script>
Basically, you'll need to modify the array to the IDs of the DIVs on your page that you wish to become an Animated DIV:
Code:
var animatedids=['mydiv', 'anotherdiv', 'div3']
Obviously, you'll need to assign a unique ID to each of the DIVs in your HTML first.
and about what you said, "and have the script randomly generate an ID for each of the participating DIVs", can you tell me about it more to make this happen?
If you're able to for example give all of the DIVs on your page that you wish to be animated a shared CSS class name, for example, the script can use that to know which DIVs should be animated, and generate a random, prerequisite ID for each of these DIVs. However, you still need to manually modify your HTML to give the DIVs in question a shared CSS class name first, so regardless of what you do, you need to manually identify the DIVs in question, either by giving them a unique ID, or a shared CSS class name.
Bookmarks