hoverIntent() not a function

泪湿孤枕 提交于 2019-12-23 23:51:00

问题


I can't seem to get hoverIntent plugin to work. It's definitely loading jQuery and hoverIntent. But, .hoverIntent() is "not a function". (.hover() works fine).

<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.5/jquery.min.js"></script>

<script type="text/javascript" src="js/jquery.hoverIntent.minified.js"></script>

<script type="text/javascript">
$(document).ready(function() {
    $('#portfolio-circle').hoverIntent(
        function() {
            $('#portfolio-hover').fadeTo('normal', 1);
            $('#portfolio-caption').fadeTo('normal', 1);
        },
        function() {
            $('#portfolio-hover').fadeTo('normal', 0);
            $('#portfolio-caption').fadeTo('normal', 0);
        }
    );
});
</script>

回答1:


Check whether you are referencing two different versions of jquery by mistake. I faced a similar error with jqueryui where everything was loading fine, but I realized later that there were two different versions of jquery being referenced.



来源:https://stackoverflow.com/questions/6903624/hoverintent-not-a-function

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!