jQuery动画在jQuery 1.10.2中没有运行TypeError:x.easing [this.easing]

时间:2013-12-19 18:51:30

标签: jquery wordpress jquery-ui jquery-animate jquery-easing

我正在研究wordpress主题并遇到一个奇怪的问题。

这是我正在处理http://dalya.go-demo.com/

的网站

我想点击右侧的菜单按钮展开菜单。而不是想点击关闭按钮关闭它。

请参阅下面的代码。

jQuery(document).ready(function () {
    $ = jQuery;

    function closeNav() {
        $('.close-nav').click(function (e) {
            e.preventDefault();
            $('.nav-area').children('nav').hide( 'slide', { direction: "right" }, 500);
            $(this).addClass('open-nav');
            $(this).removeClass('close-nav');
            openNav();
        });
    }

closeNav();

    function openNav() {
        $('.open-nav').click(function (e) {
            e.preventDefault();
            $('.nav-area').children('nav').show( 'slide', { direction: "right" }, 500);
            $(this).addClass('close-nav');
            $(this).removeClass('open-nav');
            closeNav();
        });
    }

openNav();

    $('.nav-area ul').children('li').children('a').hover(function () {
        $(this).children('span').animate({top:'-54px'});
        $(this).children('div.animated').show( 'slide', {direction: "up"}, 500);
    }, function () {
        $(this).children('span').animate( {top:'0px'} );
        $(this).children('div.animated').hide( 'slide', { direction: "up" } , 500);
    });

});

但是我收到以下错误:

  

错误:TypeError:x.easing [this.easing]不是函数源文件:   ... / wp-includes / js / jquery / jquery.js?ver = 1.10.2行:5

我已经在此论坛上测试了所有可用的解决方案,但没有成功。

  • 添加了jQuery。
  • 添加了jQuery UI。
  • 添加了jQuery Easing。

  • 未添加双重jquery。

相同的代码在我的网站HTML版本中运行良好,但在Wordpress版本中我遇到了这个问题。

1 个答案:

答案 0 :(得分:1)

我遇到了同样的问题,不得不将jquery缓动插件排入队列。

http://gsgd.co.uk/sandbox/jquery/easing/