MEAR
04-17-2010, 03:54 AM
1) Script Title: Animated Collapsible DIV v2.4
2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex17/animatedcollapse.htm
3) Describe problem: I'm doing a multiple animated div page where i'd like to have a simple image with rollover effect.
The initial onclick would be a call to hide a specific group of id's. I have this working with the following:
<a href="javascript:animatedcollapse.show(unique_group_of_IDs)"><img src="sample_state1.png"></a>
and to hide:
<a href="javascript:animatedcollapse.hide(unique_group_of_IDs)"><img src="sample_state2.png"></a>
The "unique_group_of_IDs" is being created by an earlier thread on DD with the following:
Inside your for loop you can also store the ids of all the auto generated ids, then pass them into functions show() and hide(). For example:
var divids=[]
for (var x=1; x<=3; x++){
animatedcollapse.addDiv('unique_group_of_IDs'+x, 'fade=0,height=210px')
divids.push('unique_group_of_IDs'+x)
}
Then:
<a href="javascript:animatedcollapse.show(divids)">Show all</a>
So! The question is how can I have one image/image rollover and link a call to that js command and then swap to another image/image rollover and then toggle the unique id while staying on the same page? There is this option as shown on the main script page but it only works for one div and not for a group.
2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex17/animatedcollapse.htm
3) Describe problem: I'm doing a multiple animated div page where i'd like to have a simple image with rollover effect.
The initial onclick would be a call to hide a specific group of id's. I have this working with the following:
<a href="javascript:animatedcollapse.show(unique_group_of_IDs)"><img src="sample_state1.png"></a>
and to hide:
<a href="javascript:animatedcollapse.hide(unique_group_of_IDs)"><img src="sample_state2.png"></a>
The "unique_group_of_IDs" is being created by an earlier thread on DD with the following:
Inside your for loop you can also store the ids of all the auto generated ids, then pass them into functions show() and hide(). For example:
var divids=[]
for (var x=1; x<=3; x++){
animatedcollapse.addDiv('unique_group_of_IDs'+x, 'fade=0,height=210px')
divids.push('unique_group_of_IDs'+x)
}
Then:
<a href="javascript:animatedcollapse.show(divids)">Show all</a>
So! The question is how can I have one image/image rollover and link a call to that js command and then swap to another image/image rollover and then toggle the unique id while staying on the same page? There is this option as shown on the main script page but it only works for one div and not for a group.