I have set up an animation and it works fine. I need this animation to fire only on certain conditions which are determined on the server side during OnLoad.
How can I modify the animation from OnLoad so that nothing happens when the condition is not true?
Thanks
<div id="emailAddressLabelDiv" runat="server" style="width:100%; border: 1px solid rgb(102, 102, 102); ">
<label id="emailAddressLabel" runat="server" width="100%"/>
</div>
<div id="info" runat="server" style=" visibility:hidden; z-index:50; position:absolute; font-size: 12px; border: solid 1px #666666; background-color: #FFFFFF; min-width:200px">
<table width="100%">
<tr>
<td> </td>
<td>
<div style="float:right;" id="closeButtonDiv" runat="server" title="Close">
<a onclick="return false;" runat="server" id="closeButton" title="Close" href="javascript:void(0)" style="padding: 5px; text-decoration:none;background-color:#666666;color:White;text-align:center;font-weight:bold;">X</a>
</div>
</td>
</tr>
<tr>
<td>
<p runat="server" id="infoParagraph">
This is where the info goes.
</p>
</td>
</tr>
</table>
</div>
<atlasToolkit:AnimationExtender ID="openAnimation" runat="server">
<atlasToolkit:AnimationProperties TargetControlID="emailAddressLabelDiv">
<Animations>
<OnClick>
<Sequence>
<EnableAction Enabled="false" />
<StyleAction AnimationTarget="info" Attribute="visibility" Value="visible"/>
<Parallel AnimationTarget="info" Duration=".3" Fps="25">
<Move Horizontal="0" Vertical="-21" />
<Color StartValue="#AAAAAA" EndValue="#FFFFFF"
Property="style" PropertyKey="backgroundColor" />
<FadeIn />
</Parallel>
</Sequence>
</OnClick>
</Animations>
</atlasToolkit:AnimationProperties>
</atlasToolkit:AnimationExtender>
<atlasToolkit:AnimationExtender ID="closeAnimation" runat="server">
<atlasToolkit:AnimationProperties TargetControlID="closeButton">
<Animations>
<OnMouseOver>
<StyleAction Attribute="color" Value="red"/>
</OnMouseOver>
<OnMouseOut>
<StyleAction Attribute="color" Value="white"/>
</OnMouseOut>
<OnClick>
<Sequence>
<Parallel AnimationTarget="info" Duration=".3" Fps="25">
<Move Horizontal="0" Vertical="21" />
<Color StartValue="#AAAAAA" EndValue="#FFFFFF"
Property="style" PropertyKey="backgroundColor" />
<FadeOut />
</Parallel>
<StyleAction AnimationTarget="info" Attribute="visibility" Value="hidden"/>
<EnableAction AnimationTarget="emailAddressLabelDiv" Enabled="true" />
</Sequence>
</OnClick>
</Animations>
</atlasToolkit:AnimationProperties>
</atlasToolkit:AnimationExtender>