This is a migrated thread and some comments may be shown as answers.

Custom Animation type

1 Answer 79 Views
This is a migrated thread and some comments may be shown as answers.
Top achievements
Rank 2
Sébastien asked on 23 Nov 2008, 06:29 PM

I'm using RadMenu under DotNetNuke host. I actually own a developper license without source code.I would like to use a completly custom animation when the sub menus opens. I would like to implement a simple fade-in-out effect in front of th default effect, but this don't seems to be accessible for the RadMenu (but it's registered in $TWA object line 331).
What is the best way to overrides/modify the current show/hide/animation system ? May I use the OnClientItemOpen and OnClientItemClose attributes to call a custom Javascript function ?



1 Answer, 1 is accepted

Sort by
T. Tsonev
Telerik team
answered on 25 Nov 2008, 01:54 PM
Hello Fichot,

The animation cannot be directly customized, but we can achieve the desired effect using jQuery. Here is the code for the fade-in:

<script type="text/javascript">
    function itemOpening(sender, eventArgs)
        // jQuery is registered as $telerik.$
            .stop()                            // stop current animation, if any
            .css({opacity : 0})                // make the element transparent
            .animate({opacity: 1}, 1000);    // fade in 1000 milliseconds
The jQuery library is included in the Q3 release, but RadMenu does not use it at the moment, so you will need to include the scripts manually:

        <asp:ScriptManager ID="ScriptManager" runat="server">
                <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.Core.js" />
                <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQuery.js" />

You can, of course, use a standalone version of jQuery. You can read more about the jQuery integration in our controls here:

Tsvetomir Tsonev
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Asked by
Top achievements
Rank 2
Answers by
T. Tsonev
Telerik team
Share this question