繁体   English   中英

jQuery动画不起作用TypeError:jQuery 1.10.2中的x.easing [this.easing]

[英]jQuery animation is not working TypeError: x.easing[this.easing] in jQuery 1.10.2

我正在研究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轻松添加。

  • 没有添加双重jQuery。

在我的网站的HTML版本中,相同的代码运行正常,但在Wordpress版本中,我遇到了此问题。

我有同样的问题,不得不加入jquery easing插件。

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

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM