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

[Solved] hoverIntent jquery plugin

2 Answers 133 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
M Givi
Top achievements
Rank 1
M Givi asked on 12 Aug 2009, 11:42 PM
Hi,
I'm trying to use this (hoverIntent) jquery plug in in my code and doesn't seem to work. How can I add a jquery plugin?

I have included the followings to my page.
    <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" />
        <asp:ScriptReference Path="~/js/jquery.hoverIntent.minified.js" />
       
    </Scripts>
</telerik:RadScriptManager>

thanks

2 Answers, 1 is accepted

Sort by
0
Accepted
Veselin Vasilev
Telerik team
answered on 14 Aug 2009, 11:35 AM
Hello M Givi,

You need to do two additional little steps:

1. Add a reference to the jQueryInclude.js file:

<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" /> 
        <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQueryInclude.js" /> 
        <asp:ScriptReference Path="~/js/jquery.hoverIntent.minified.js" />        
    </Scripts> 
</telerik:RadScriptManager> 

2. Add the highlighted line before you try to use the $ alias on your page:

<script type="text/javascript" charset="utf-8"
    var $ = $telerik.$; 
    $(document).ready(function() { 
        $("#demo3 li").hoverIntent({ 
            sensitivity: 3, 
            interval: 200, 
            over: makeTall, 
            timeout: 500, 
            out: makeShort 
        }); 
    });  // close document.ready 
 
        function makeTall(){  $(this).animate({"height":75},200);} 
        function makeShort(){ $(this).animate({"height":50},200);} 
    </script>        

I hope this helps.

Best wishes,
Veselin Vasilev
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
M Givi
Top achievements
Rank 1
answered on 20 Aug 2009, 05:46 PM
It worked! thanks a lot.
Tags
General Discussions
Asked by
M Givi
Top achievements
Rank 1
Answers by
Veselin Vasilev
Telerik team
M Givi
Top achievements
Rank 1
Share this question
or