RadControls集成jquery,随便几行代码吊死你!不信来看!

RadControls Q3 2008开始集成了jquery,加上jquery视觉效果是帅多了..

 

代码非常简单,

首先导入jquery的js

        <telerik:RadScriptManager runat="server" ID="RadScriptManager1">
            <Scripts>
                <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" />
            </Scripts>
        </telerik:RadScriptManager>

这个只有Q3版本的才支持哦

然后

 

        <telerik:RadComboBox runat="server" ID="RadComboBox1" Width="300px" Skin="Telerik">
            
<Items>
                
<telerik:RadComboBoxItem Text="ASP.NET AJAX UI Controls" />
                
<telerik:RadComboBoxItem Text="WinForms UI Controls" />
                
<telerik:RadComboBoxItem Text="WPF UI Controls" />
                
<telerik:RadComboBoxItem Text="Silverlight UI Controls" />
                
<telerik:RadComboBoxItem Text="Telerik Reporting" />
                
<telerik:RadComboBoxItem Text="Telerik OpenAccess ORM" />
                
<telerik:RadComboBoxItem Text="Telerik Sitefinity CMS" />
            
</Items>
        
</telerik:RadComboBox>

        
<script type="text/javascript">
            (
function($) {
                $(document).ready(
function() {
                    $(
'.rcbItem')
                    .mouseover(
function() {
                        $(
this).stop().animate({ paddingLeft: "30px" }, { duration: 300 });
                    })
                    .mouseout(
function() {
                        $(
this).stop().animate({ paddingLeft: "4px" }, { duration: 300 });
                    });
                });
            })($telerik.$);
        
</script>

 

然后在body onload的时候添加2个动画函数!

 

posted @ 2008-11-22 21:18  索马  阅读(2321)  评论(14编辑  收藏  举报