Search code examples
asp.netajaxcontroltoolkit

Animation extender


What is the purpose of below code? I got this from a developer, and I dont know what this animationExtender is doing.

<asp:Panel ID="Panel2" runat="server" Width="300px" BackColor="Gold">
        <div id="parentDiv">
            Parent element layout
            <div id="childDiv">
                Child element layout</div>
        </div>
    </asp:Panel>
    <aspext:AnimationExtender ID="Extender2" runat="server" TargetControlID="Panel2">
        <Animations>
            <OnHoverOver>
                <Condition ConditionScript="onDivHoverOver()"></Condition>
            </OnHoverOver>
            <OnHoverOut >
                <Condition ConditionScript="onDivHoverOut()"></Condition>
            </OnHoverOut>
        </Animations>
    </aspext:AnimationExtender>

JavaScript functions are below:

 function onDivHoverOver() {
        count = 0;
    }
    function onDivHoverOut() {
        count++;
    }

Solution

  • Weird.

    Looks like the code is simply setting count to 0 on over and setting count to 1 after the mouse moves out.

    Need more code to determine usage.