Quantcast
Channel: ASP.NET AJAX + Ajax Control Toolkit (ACT)
Viewing all articles
Browse latest Browse all 5678

How to run different animations depending on condition?

$
0
0

Hi,

I have two Panels, each containing a Label with text. The panels overlay each other. Label 1 and Panel 1 hide Label 2 and Panel 2 because they are on top.

1.
When user presses button, Label 1 and Panel 1 fadeout. This leave Label 2 and Panel 2 displayed.

2.
Invisible to user is that I then change z-index of Label 1 and Panel 1 so it now sits behind Label 2 and Panel 2.

3.
Next invisible to user, I fade Label 1 and Panel 1 back in but because behind Label 2 and Panel 2, user can not see.

4.
When user presses button 2nd time, I want to now fade out Label 2 and Panel 2. This will leave Label 1 and Panel 1 displayed.

Steps 1 to 3 are easy. My question is how to add a condition to AJAX so that when user presses button 2nd time, Label 2 and Panel 2 are faded out instead of Label 1 and Panel 1.

This is process I need to repeat, so when user presses button 3rd time, Label 1 and Panel 1 now fade out etc, etc.

Thank you.


Viewing all articles
Browse latest Browse all 5678

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>